public function getTrashField($aliased = true)
    {
        $field = $this->getConfig('field');

        if (empty($field)) {
            $columns = $this->_table->getSchema()->columns();
            foreach (['deleted', 'trashed'] as $name) {
                if (in_array($name, $columns, true)) {
                    $field = $name;
                    break;
                }
            }

            if (empty($field)) {
                $field = Configure::read('Muffin/Trash.field');
            }

            if (empty($field)) {
                throw new RuntimeException('TrashBehavior: "field" config needs to be provided.');
            }

            $this->setConfig('field', $field);
        }

        if ($aliased) {
            return $this->_table->aliasField($field);
        }

        return $field;
    }
public function getTrashField($aliased = true)
    {
        $field = $this->getConfig('field');

        if (empty($field)) {
            $columns = $this->_table->getSchema()->columns();
            foreach (['deleted', 'trashed'] as $name) {
                if (in_array($name, $columns, true)) {
                    $field = $name;
                    break;
                }
            }

            if (empty($field)) {
                $field = Configure::read('Muffin/Trash.field');
            }

            if (empty($field)) {
                throw new RuntimeException('TrashBehavior: "field" config needs to be provided.');
            }

            $this->setConfig('field', $field);
        }

        if ($aliased) {
            return $this->_table->aliasField($field);
        }

        return $field;
    }
public function getTrashField ( $ aliased = true ) { $ field = $ this -> getConfig ( 'field' ) ; if ( empty ( $ field ) ) { $ columns = $ this -> _table -> getSchema ( ) -> columns ( ) ; foreach ( [ 'deleted' , 'trashed' ] as $ name ) { if ( in_array ( $ name , $ columns , true ) ) { $ field = $ name ; break ; } } if ( empty ( $ field ) ) { $ field = Configure :: read ( 'Muffin/Trash.field' ) ; } if ( empty ( $ field ) ) { throw new RuntimeException ( 'TrashBehavior: "field" config needs to be provided.' ) ; } $ this -> setConfig ( 'field' , $ field ) ; } if ( $ aliased ) { return $ this -> _table -> aliasField ( $ field ) ; } return $ field ; }
Returns the table's field used to mark a `trashed` row.

@param bool $aliased Should field be aliased or not. Default true.
@return string
Returns the table s field used to mark a trashed row .