/** * When receiving a POST, get the row editor setup and then call its * delete() method. */ public function process() { if ($this->request->isPost()) { $rowEditor = $this->component->getRowEditor(); $rowEditor->link(); $rowEditor->delete(); $this->result = 'success'; } }
/** * When receiving a POST, get the row editor setup and then call its * delete() method. * * @param ResponseHelper $response */ public function process(ResponseHelper $response) { if ($this->request->isPost()) { $rowEditor = $this->component->getRowEditor(); $rowEditor->link(); $rowEditor->restore(); $this->logActivity($rowEditor); $this->result = 'success'; } }
public function render() { $this->component->getPermissions()->haltIfNotAllowed('create'); $renderer = $this->view->editControlRenderer(); $rowEditor = $this->component->getRowEditor(); $field = $this->component->getFields()->get($this->request->getQuery('field')); $value = $this->request->getQuery('value'); $rowEditor->link(); if ($field instanceof ManyToManyField) { $field->setValue([$value]); } else { $field->setValue($value); } $this->component->setShouldRenderLayout(false); return $renderer->getControlRenderer()->render($field, 0); }
public function getRowEditor() { if (!$this->rowEditor) { $this->rowEditor = $this->component->getRowEditor(); } return $this->rowEditor; }
/** * @return \Dewdrop\Fields\RowEditor */ public function getRowEditor() { return $this->component->getRowEditor(); }