Saves the trackables

@param $view
@param bool $success
@return bool
506231
protected function saveTrackables($view, $success)
    {
        foreach ($this->trackables as $trackable)
        {
            $trackable->attachTrackerView($view);
        }

        return $success;
    }
1192954
public function success(Form $form) : void
    {
        if ($this->presenter->isAjax())
        {
            $values = $form->getValues();

            try
            {
                if ($values->id > 0)
                {
                    $this->categoryManager->save($values->id, $values->parentId, $values->name, $values->slug);
                }
                else
                {
                    $this->categoryManager->add($this->activeLang, $values->parentId, $values->name, $values->slug);
                }

                $this->presenter->notificationAjax(
                    'Kategorie uložena',
                    'Kategorie byla úspěšně uložena',
                    'success',
                    FALSE
                );

                // Redraw form
                $langRoot = $this->categoryRepository->findLangRoot($this->activeLang);
                $parents = [-1 => 'Bez nadřazené kategorie'];

                // Nastaví možné nadřazené kategorie
                if ($langRoot)
                {
                    $parents += $this->getWithoutDescendants($langRoot, NULL);
                }

                $form['parentId']->setItems($parents);

                $form->reset();
                $this->onSave();
            }

            catch (DatabaseException $exception)
            {
                $this->presenter->notificationAjax(
                    'Chyba',
                    $exception->getMessage(),
                    'error'
                );
            }
        }
    }
245835
public function success(Form $form) : void
    {
        if ($this->presenter->isAjax())
        {
            $values = $form->getValues();

            try
            {
                $urlBefore = $this->activePage->getPageUrl()->getUrl();
                $urlAfter = $this->pageUrlManager->saveUrl($this->activeLang, $this->activePage, $values->url);

                if ($urlBefore !== $urlAfter->getUrl())
                {
                    $this->presenter->notification(
                        'URL stránky',
                        'URL stránky byla úspěšně uložena.',
                        'success'
                    );

                    $this->presenter->redirect(':App:Run:setUrl', ['url' => $urlAfter->getUrl()]);
                }
                else
                {
                    $this->presenter->notificationAjax(
                        'URL stránky',
                        'URL stránky byla úspěšně uložena.',
                        'success'
                    );
                }
            }
            catch (DatabaseException $exception)
            {
                $form->setValues([
                    'url' => $this->activePage->getPageUrl()->getUrl()
                ]);

                $this->presenter->notificationAjax(
                    'Chyba',
                    $exception->getMessage(),
                    'error',
                    FALSE
                );

                $this->onSaveFail();
            }
        }
    }
1121892
public static function saveResult(RequestBag $requestBag, $result)
    {
        // check if we have cache in settings
        if (!$requestBag->getApiConfig()->get('Cache', false) || $requestBag->getMethodData()['cache']['ttl'] <= 0) {
            return false;
        }

        $instance = new self($requestBag);

        return $instance->saveCallbackResult($result);
    }
78187
protected function processOutput($view, $data = [])
    {
        $name = $this->generateFileName();

        $path = __DIR__ . DIRECTORY_SEPARATOR . "{$name}";

        file_put_contents($path, $this->generateView($view, $data));

        $this->getPhantomProcess($path)->setTimeout(0)->mustRun();

        return $path;
    }
1151636
public function save($validate = true)
    {
        $success = true;

        if ($validate) {
            if ($success = $this->validate()) {
                if ($this->isNew()) {
                    $this->insert();
                } else {
                    $this->update();
                }
            }
        } else {
            if ($this->isNew()) {
                $this->insert();
            } else {
                $this->update();
            }
        }

        return $success;
    }
802327
protected function save($model)
    {
        /** @var \nineinchnick\audit\behaviors\TrackableBehavior $trackable */
        if (($trackable = $model->getBehavior('trackable')) !== null) {
            $model->beginChangeset();
        }
        $result = $model->save(false) && $model->saveRelations(Yii::$app->getRequest()->getBodyParams());
        if ($trackable !== null) {
            $model->endChangeset();
        }
        return $result;
    }
435351
public function fetch($key, &$success = false)
	{
		if(!$this->exists($key)) {
			$success = false;
			return false;
		}

		return $this->data[$key][0];
	}
870952
public function find_file($view, $themes = null)
	{
		if (is_null($themes))
		{
			$themes = $this->get_parent_themes($this->active['name']);
		}

		return parent::find_file($view, $themes);
	}
1112583
public function registerAssetFiles($view)
    {
        if (YII_ENV_PROD) {
            if (!empty($this->productionJs)) {
                $this->js = $this->productionJs;
            }
            if (!empty($this->productionCss)) {
                $this->css = $this->productionCss;
            }
        }
        parent::registerAssetFiles($view);
    }
582527
private function saveCache($result) {
        if (!$result) return false;
        $cache = DATA . 'select' . DIRECTORY_SEPARATOR . $this->encode($this->getName()) . '.php';
        return Util::updateConfig($cache,
                        array($this->encode($this->query . serialize($this->values)) => $this->encode(serialize($result))));
    }
1244980
public static function exists(string $view): bool
    {
        $pos = strpos($view, ':');

        if ($pos === false) {
            $path = Application::getViewPath() . $view . '.phtml';
        } else {
            $path = dirname(substr(Application::getViewPath(), 0, -1)) . DS . 'modules' . DS . substr($view, 0, $pos) . DS . 'views' . DS . substr($view, $pos + 1) . '.phtml';
        }


        return is_file($path);
    }
857280
function hasViewResult( $view = '' )
    {
        if ( $view == '' )
            $view = $this->currentView();
        return isset( $this->ViewResult[$view] );
    }
1217916
public static function record_savepoint($version) {
        global $CFG, $OUTPUT;

        // In developer debug mode we show a notification after each individual save point.
        if ($CFG->debugdeveloper && self::$isrecording) {
            $time = microtime(true);

            $notification = new \core\output\notification($version . ': ' .
                    get_string('successduration', '', format_float($time - self::$lastsavepoint, 2)),
                    \core\output\notification::NOTIFY_SUCCESS);
            $notification->set_show_closebutton(false);
            echo $OUTPUT->render($notification);
            self::$lastsavepoint = $time;
        }
    }
904647
public function setView($view)
    {
        $view   = parent::setView($view);
        $format = $this->getRequest()->getFormat();

        if ($view instanceof KObjectIdentifier && $view->getPackage() != 'activities' && $format  !== 'html')
        {
            $manager = $this->getObject('manager');

            // Set the view identifier as an alias of the component view.
            if (!$manager->getClass($view, false))
            {
                $identifier = $view->toArray();
                $identifier['package'] = 'activities';
                unset($identifier['domain']);

                $manager->registerAlias($identifier, $view);
            }
        }

        return $view;
    }
1098712
public function afterIsCacheable(ViewLayout $subject, $result): bool
    {
        if (
            $this->config->isEnabledLayoutDebug()
            && (
                $this->request->getParam('xml')
                || $this->request->getParam('hints')
            )
        ) {
            return false;
        }

        return $result;
    }
760015
public function saveCurrent()
    {
        if ($this->saveEnabled() && $this->isViewValid() && $this->isViewUnique())
        {
            $success = $this->saveCurrentModel();

            // Keep on only if the model save has succeeded
            if ($success)
            {
                $this->storeCurrentHash();

                $this->saveTrackables(
                    $this->getCurrent(),
                    $success
                );
            }

            return $success;
        }

        return false;
    }