public function detach($id)
    {
        $instance = $this->_getOrThrow($id, ['locked' => false]);
        $this->loadModel('Field.FieldInstances');

        if ($this->FieldInstances->delete($instance)) {
            $this->Flash->success(__d('field', 'Field detached successfully!'));
        } else {
            $this->Flash->danger(__d('field', 'Field could not be detached'));
        }

        $this->title(__d('field', 'Detach Field'));
        $this->redirect($this->referer());
    }