protected function _isRecursable(Association $association, Table $table)
    {
        if ($association->getTarget()->hasBehavior('Trash')
            && $association->isOwningSide($table)
            && $association->getDependent()
            && $association->getCascadeCallbacks()
        ) {
            return true;
        }

        return false;
    }
protected function _isRecursable(Association $association, Table $table)
    {
        if ($association->getTarget()->hasBehavior('Trash')
            && $association->isOwningSide($table)
            && $association->getDependent()
            && $association->getCascadeCallbacks()
        ) {
            return true;
        }

        return false;
    }
protected function _isRecursable ( Association $ association , Table $ table ) { if ( $ association -> getTarget ( ) -> hasBehavior ( 'Trash' ) && $ association -> isOwningSide ( $ table ) && $ association -> getDependent ( ) && $ association -> getCascadeCallbacks ( ) ) { return true ; } return false ; }
Find out if an associated Table has the Trash behaviour and it's records can be trashed

@param \Cake\ORM\Association $association The table association
@param \Cake\ORM\Table $table The table instance to check
@return bool
Find out if an associated Table has the Trash behaviour and it s records can be trashed