Usuwanie zbuforowanych renderów widgetów
@return boolean
767402
public function clearCache()
    {
        //iteracja po relacjach widgetów
        foreach ((new CmsCategoryQuery)
            ->whereCmsCategoryTypeId()
            ->equals($this->id)
            ->findPairs('id', 'id') as $categoryId) {
            //usuwanie bufora
            \App\Registry::$cache->remove('category-html-' . $categoryId);
        }
        return true;
    }
268273
public function render() {
		
		$model = $this->getParent()->getModel();
		$attribute = $this->name;
		$options = $this->generateGroupOptions();

		if (isset(self::$inputTypes[$this->type])) {
			$method = self::$inputTypes[$this->type];
			// FIXME ... why we are passing $this->attributes ... most all TbActiveForm method only require $options 
			return $this->getParent()->getActiveFormWidget()->$method($model, $attribute, $this->attributes, $options);
			/* no need for this as now data goes inside $options['widgetOptions']['data']
			switch ($method) {
				case 'listBoxGroup':
				case 'dropDownListGroup':
				case 'checkBoxListGroup':
				case 'radioButtonListGroup': 
					return $this->getParent()->getActiveFormWidget()->$method($model, $attribute, $this->attributes, $this->items, $options);

				default:
					return $this->getParent()->getActiveFormWidget()->$method($model, $attribute, $this->attributes, $options);
			}
			*/
		} else {
			$attributes = $this->attributes;
			$attributes['model'] = $this->getParent()->getModel();
			$attributes['attribute'] = $this->name;

			return $this->getParent()->getActiveFormWidget()->customFieldGroup(
				array(array($this->getParent()->getOwner(), 'widget'), array($this->type, $attributes, true)),
				$model,
				$attribute,
				$options
			);
		}
	}
24120
public function addAction()
    {
        //wyszukiwanie kategorii
        if (null === $cat = (new \Cms\Orm\CmsCategoryQuery)->findPk($this->id)) {
            return;
        }
        //zakładka sekcje
        $widgetForm = (new \CmsAdmin\Form\CategoryAddWidget($cat));
        //zapisany form
        if ($widgetForm->isSaved()) {
            $this->getResponse()->redirect('cmsAdmin', 'categoryWidgetRelation', 'config', ['categoryId' => $this->id, 'widgetId' => $widgetForm->getElement('cmsWidgetId')->getValue()]);
        }
        //form do widoku
        $this->view->widgetForm = $widgetForm;
    }
926071
public function isAllowed()
    {
		//jeśli brak dostępu do aktualnej kategorii
		if (!$this->_checkAccess($this->_category->id)) {
			return false;
		}
		//jeśli brak dostępu do któregoś rodzica
		if (!$this->_checkParents()) {
			return false;
		}
        return true;
    }
937096
public function renderClearing()
    {
        if (empty($this->items)) {
            return true;
        }
        $list = array();
        foreach ($this->items as $item) {
            $list[] = $this->renderItem($item);
        }
        return \CHtml::tag('ul', $this->htmlOptions, implode("\n", $list));
    }
845795
public function render(): string {
		$out = $this->before();
		foreach ( $this->_widgets as $widget ) {
			$out .= $widget->render();
		}
		$out .= $this->after();

		$this->content = $out;

		return $this->template ? render( $this->template, $this->getAttributes() ) : $out;
	}
856070
protected function _bufferingAllowed()
    {
        //jeśli zdefiniowano własny obiekt sprawdzający, czy można buforować
        if (\App\Registry::$config->category instanceof \Cms\Config\CategoryConfig && \App\Registry::$config->category->bufferingAllowedClass) {
            $class = \App\Registry::$config->category->bufferingAllowedClass;
            $buffering = new $class($this->_request);
        } else {
            //domyślny cmsowy obiekt sprawdzający, czy można buforować
            $buffering = new \Cms\Model\CategoryBuffering($this->_request);
        }
        return $buffering->isAllowed();
    }
1270571
public function nodeAction()
    {
        //wyłączenie layout
        FrontController::getInstance()->getView()->setLayoutDisabled();
        //id węzła rodzica
        $this->view->parentId = ($this->parentId > 0) ? $this->parentId : null;
        //pobranie drzewiastej struktury stron CMS
        $this->view->categoryTree = (new \Cms\Model\CategoryModel)->getCategoryTree($this->view->parentId);
    }
650528
public function handleRequest()
    {
        //obsługa eksportera
        $this->_handleCsvExporter(FrontController::getInstance()->getRequest());
        //obsługa danych z POST
        $post = FrontController::getInstance()->getRequest()->getPost();
        //brak posta
        if ($post->isEmpty()) {
            return;
        }
        //jeśli przebudowano filtry lub sortowania render grida
        if ($this->_rebuildFilter($post) || $this->_rebuildOrder($post)) {
            $this->_render();
        }
    }
929859
protected function renderViews()
    {
        if (empty($this->_relViews))
        {
            $message = \Yii::t('dlds/rels/widgets', 'RelTabs widget cannot be generated. No related models exist. Please create at least one relation model first.');
            
            echo \yii\helpers\Html::tag('div', $message, ['class' => 'alert alert-warning']);
        }
        else
        {
            $widget = $this->relViewClass;

            echo $widget::widget(array(
                'items' => $this->_relViews,
                'options' => array(
                    'collapsible' => true,
                ),
            ));
        }
    }
1358
public function render()
    {
        $viewPath = $this->getDirectory() . '/'. $this->getName() . '.' . $this->getExtension();
        if (!file_exists($viewPath)) {
            trigger_error('View file "' . $viewPath . '" doesn\'t exist.', E_USER_ERROR);
            return false;
        }
        if (Configuration::read('mvc.autoload_shared_var') && !empty($this->variableList)) {
            foreach ($this->variableList as $varName => $varValue) {
                ${$varName} = $varValue;
            }
        }
        ob_start();
        require($viewPath);
        echo PHP_EOL;
        return ob_get_clean();
    }
1229232
public function renderWidget()
    {
        $items = [];
        foreach ($this->items as $item) {
            $appkey = $this->getShareKey($item);
            $name = self::t(ArrayHelper::getValue($this->shareMapping, $item));
            $icon = Html::tag('i', '', ['class' => "fa fa-{$this->icon_size} fa-{$item} share-{$item}", 'aria-hidden' => 'true']);
            $link = Html::a($icon, 'javascript:void(0);', [
                'data' => ['toggle' => 'tooltip', 'placement' => 'top', 'original-title' => self::t('Share to {name}', ['name' => $name])]
            ]);
            $items[] = Html::tag('li', $link, ['data' => ['network' => $item, 'appkey' => $appkey]]);
        }
        return Html::tag('ul', implode("\n", $items), $this->itemOptions);
    }
213501
public function render() {

		$output = '<div id="' . esc_attr( $this->id() ) . '" data-color="' . esc_attr( $this->base_color() ) . '" data-for="' . esc_attr( $this->id() ) . '-control" class="uix-control uix-control-' . esc_attr( $this->type ) . ' ' . esc_attr( $this->id() ) . '"></div>';
		$output .= $this->label();
		$output .= $this->input();

		$output .= $this->component_templates();

		$output .= $this->modal_template();

		return $output;
	}
591785
public function beforeSave()
    {
        //brak loginu lub hasła
        if (!$this->getElement('username')->getValue() || !$this->getElement('password')->getValue()) {
            return false;
        }
        //autoryzacja
        $auth = \App\Registry::$auth;
        \App\Registry::$auth->setIdentity($this->getElement('username')->getValue());
        \App\Registry::$auth->setCredential($this->getElement('password')->getValue());
        //autoryzacja
        if (!\App\Registry::$auth->authenticate()) {
            return false;
        }
        //zapamiętanie jeśli zaznaczona opcja
        if ($this->getElement('remember')) {
            \App\Registry::$auth->rememberMe(\App\Registry::$config->session->authRemember);
        }
        return true;
    }
244405
public function hasRenderer()
    {
        if (!isset($this->_data['renderer'])) {
            return false;
        }

        if (is_string($this->_data['renderer'])) {
            // Renderer class name has been given
            $renderer = $this->_data['renderer'];
            $namespace = ResourceTable::collection()->rendererNamespace();
            if ($namespace) {
                $renderer = $namespace.'\\'.$renderer;
            }
            if (!class_exists($renderer)) {
                return false;
            }
            if (!method_exists($renderer, 'render') || !is_callable([$renderer, 'render'])) {
                return false;
            }
        }

        return true;
    }
319992
public function renderButtons() {
		
		$output = '';
		foreach ($this->getButtons() as $button) {
			$output .= $this->renderElement($button);
		}

		if ($output !== '' && $this->activeFormWidget->type !== TbActiveForm::TYPE_INLINE) {
			$output = "<div class=\"form-actions\">\n" . $output . "</div>\n";
		}

		return $output;
	}
1047125
public function updateAction()
    {
        $msg = $this->view->getTranslate()->_('Zmiana właściwości nie powiodła się.');
        $this->getResponse()->setTypePlain();
        $params = explode('-', $this->id);

        //błędne dane wejściowe
        if (!($this->getPost()->selected) || count($params) != 3) {
            return $msg;
        }
        $record = (new \Cms\Orm\CmsAclQuery)->findPk($params[2]);
        if (!$record) {
            return $msg;
        }
        //zmiana zasobu
        if ($params[1] == 'resource') {
            $resource = [];
            parse_str($this->getPost()->selected, $resource);
            $record->module = strtolower($resource['module']);
            $record->controller = isset($resource['controller']) ? strtolower($resource['controller']) : null;
            $record->action = isset($resource['action']) ? strtolower($resource['action']) : null;
        } else {
            //zmiana uprawnienia z allow na deny lub odwrotnie
            $record->access = $this->getPost()->selected == 'allow' ? 'allow' : 'deny';
        }
        $record->save();
        return 1;
    }