FOF30\Controller\DataController::apply PHP Method

apply() public method

Save the incoming data and then return to the Edit task
public apply ( ) : void
return void
    public function apply()
    {
        // CSRF prevention
        $this->csrfProtection();
        // Redirect to the edit task
        if (!$this->applySave()) {
            return;
        }
        $id = $this->input->get('id', 0, 'int');
        $textKey = strtoupper($this->container->componentName . '_LBL_' . $this->container->inflector->singularize($this->view) . '_SAVED');
        if ($customURL = $this->input->getBase64('returnurl', '')) {
            $customURL = base64_decode($customURL);
        }
        $url = !empty($customURL) ? $customURL : 'index.php?option=' . $this->container->componentName . '&view=' . $this->view . '&task=edit&id=' . $id . $this->getItemidURLSuffix();
        $this->setRedirect($url, \JText::_($textKey));
    }