public function afterDelete(Event $event, FieldInstance $instance, ArrayObject $options = null)
    {
        if (!empty($this->_deleted)) {
            TableRegistry::get('Eav.EavAttributes')->delete($this->_deleted->get('eav_attribute'));
            $instance->afterDetach();
            $this->_deleted = null;
        }
    }
public function afterDelete(Event $event, FieldInstance $instance, ArrayObject $options = null)
    {
        if (!empty($this->_deleted)) {
            TableRegistry::get('Eav.EavAttributes')->delete($this->_deleted->get('eav_attribute'));
            $instance->afterDetach();
            $this->_deleted = null;
        }
    }
public function afterDelete ( Event $ event , FieldInstance $ instance , ArrayObject $ options = null ) { if ( ! empty ( $ this -> _deleted ) ) { TableRegistry :: get ( 'Eav.EavAttributes' ) -> delete ( $ this -> _deleted -> get ( 'eav_attribute' ) ) ; $ instance -> afterDetach ( ) ; $ this -> _deleted = null ; } }
Triggers the callback "afterDetach", it also deletes all associated records
in the "field_values" table.

@param \Cake\Event\Event $event The event that was triggered
@param \Field\Model\Entity\FieldInstance $instance The Field Instance that was deleted
@param \ArrayObject $options the options passed to the delete method
@return void
Triggers the callback afterDetach it also deletes all associated records in the field_values table .