Renders the form Tab and Content for the modal
@return \MelisCms\Controller\ViewModel
779326
public function renderToolStyleModalFormHandlerAction()
    {
        $data = array();

        $styleId = (int) $this->params()->fromQuery('styleId', '');

        $melisKey = $this->params()->fromRoute('melisKey', '');
        // declare the Tool service that we will be using to completely create our tool.
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');
        $melisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisCoreConfig->getFormMergedAndOrdered('meliscms/tools/meliscms_tool_styles/forms/meliscms_tool_styles_form','meliscms_tool_styles_form');
        $factory = new \Zend\Form\Factory();
        $formElements = $this->serviceLocator->get('FormElementManager');
        $factory->setFormElementManager($formElements);
        $form = $factory->createForm($appConfigForm);

        // set title
        $title    = $melisTool->getTranslation('tr_meliscore_tool_styles_new');

        if(!empty($styleId)){

            $tableStyle = $this->getServiceLocator()->get('MelisEngineTableStyle');
            $details = $tableStyle->getEntryById($styleId)->current();

            $data = (array)$details;
            $title = $melisTool->getTranslation('tr_meliscore_tool_styles_edit');

        }else{
            $form->get('style_id')->setAttribute('class', 'hidden');
            $form->get('style_id')->setOptions(array('label_attributes' => array('class'  => 'hidden')));
        }

        $form->setData($data);

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        $view->form = $form;
        $view->title = $title;
        $view->styleId = $styleId;
        return $view;
    }
822316
public function toolModalContentAction()
    {
        $id       = (int)$this->params()->fromRoute('id', $this->params()->fromQuery('id', ''));
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $title    = $this->tool()->getTranslation('tr_melis_cms_prospects_theme_items_edit_title');
        $data     = array();
        $themeItemId  = (int)$this->params()->fromQuery('itemId', null);

        $code = $this->params()->fromQuery('code', null);
        $form = $this->getThemeItemForm();
        
        if($themeItemId)
        $data = $this->themeItemTable()->getItemById($themeItemId)->toArray();

        $langTable = $this->getServiceLocator()->get('MelisEngineTableCmsLang');
        $languages = $langTable->fetchAll()->toArray();

        $tmpData = array();

        $view            = new ViewModel();
        $view->melisKey  = $melisKey;
        $view->title     = $title;
        $view->form      = $form;
        $view->data      = $data;
        $view->languages = $languages;
        $view->itemId    = $themeItemId;
        return $view;
    }
1306591
public function renderToolUserModalEmptyAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $view = new ViewModel();
        $view->melisKey = $melisKey;

        return $view;
    }
1297588
public function render()
    {
        $this->initPlainInput();

        $this->prepend('<i class="fa fa-pencil fa-fw"></i>')
            ->defaultAttribute('type', 'text')
            ->defaultAttribute('id', $this->id)
            ->defaultAttribute('name', $this->elementName ?: $this->formatName($this->column))
            ->defaultAttribute('value', old($this->column, $this->value()))
            ->defaultAttribute('class', 'form-control '.$this->getElementClassString())
            ->defaultAttribute('placeholder', $this->getPlaceholder());

        $this->addVariables([
            'prepend' => $this->prepend,
            'append'  => $this->append,
        ]);

        return parent::render();
    }
761760
protected function renderContent() {
        
        /** @var AbstractModule $module  */
        $module = $this->data->get('module');        
        ?>        
        <ol class="breadcrumb small">
        	<li><a href="admin.php"><?php echo I18N::translate('Control panel'); ?></a></li>
			<li><a href="admin_modules.php"><?php echo I18N::translate('Module administration'); ?></a></li>
			<li class="active"><?php echo $this->data->get('title'); ?></li>
		</ol>
		
		<h1><?php echo $this->data->get('title'); ?></h1>

		<form method="post" class="form-horizontal">
			<?php echo Filter::getCsrf(); ?>
			<input type="hidden" name="action" value="update">
			
			<h3><?php echo I18N::translate('General'); ?></h3>
			
			<!--  MAJ_CERT_ROOTDIR -->        	
        	<div class="form-group">
        		<label class="control-label col-sm-3" for="MAJ_CERT_ROOTDIR">
        			<?php echo I18N::translate('Certificates directory'); ?>
        		</label>
        		<div class="col-sm-9">
        			<div class="input-group">
        				<span class="input-group-addon">
        					<?php echo WT_DATA_DIR; ?>
        				</span>
        				<input
        					class="form-control"
        					dir="ltr"
        					id="MAJ_CERT_ROOTDIR"
        					maxlength="255"
        					name="MAJ_CERT_ROOTDIR"
        					type="text"
        					value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_CERT_ROOTDIR', 'certificates/')); ?>"
        					required
        				>
        			</div>
        			<p class="small text-muted">
        				<?php echo I18N::translate('This folder will be used to store the certificate files.'); ?>
        				<?php echo I18N::translate('If you select a different folder, you must also move any certificate files from the existing folder to the new one.'); ?>
        			</p>
        		</div>
        	</div>
        	
        	<!-- MAJ_SHOW_CERT -->
        	<div class="form-group">
        		<label class="control-label col-sm-3" for="MAJ_SHOW_CERT">
        			<?php echo I18N::translate('Show certificates'); ?>
        		</label>
        		<div class="col-sm-9">
        			<?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_CERT', $module->getSetting('MAJ_SHOW_CERT', Auth::PRIV_HIDE), 'class="form-control"'); ?>
        			<p class="small text-muted">
        				<?php echo I18N::translate('Define access level required to display certificates in facts sources. By default, nobody can see the certificates.'); ?>
        			</p>
        		</div>
        	</div>
        	
        	<h3><?php echo I18N::translate('Watermarks'); ?></h3>
        	
        	<!-- MAJ_SHOW_NO_WATERMARK -->
        	<div class="form-group">
        		<label class="control-label col-sm-3" for="MAJ_SHOW_NO_WATERMARK">
        			<?php echo I18N::translate('Show certificates without watermark'); ?>
        		</label>
        		<div class="col-sm-9">
        			<?php echo FunctionsEdit::editFieldAccessLevel('MAJ_SHOW_NO_WATERMARK', $module->getSetting('MAJ_SHOW_NO_WATERMARK', Auth::PRIV_HIDE), 'class="form-control"'); ?>
        			<p class="small text-muted">
        				<?php echo I18N::translate('Define access level of users who can see certificates without any watermark. By default, everybody will see the watermark.'); ?>
        			</p>
        			<p class="small text-muted">
        				<?php echo I18N::translate('When displayed, the watermark is generated from the name of the repository and of the sources, if they exist. Otherwise, a default text is displayed.'); ?>
        			</p>
        		</div>
        	</div>
        	
        	<!--  MAJ_WM_DEFAULT -->
			<div class="form-group">			
        		<label for="MAJ_WM_DEFAULT" class="col-sm-3 control-label">
        			<?php echo I18N::translate('Default watermark'); ?>
        		</label>
    			<div class="col-sm-9">
    				<input type="text" class="form-control" dir="ltr" id="MAJ_WM_DEFAULT" name="MAJ_WM_DEFAULT" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_WM_DEFAULT')); ?>" maxlength="255" placeholder="<?php echo I18N::translate('This image is protected under copyright law.')?>">
        			<p class="small text-muted">
        				<?php echo I18N::translate('Text to be displayed by default if no source has been associated with the certificate.'); ?>
        			</p>
        		</div>        		
        	</div>
        	
        	<!--  MAJ_WM_FONT_COLOR -->
			<div class="form-group">			
        		<label for="MAJ_WM_FONT_COLOR" class="col-sm-3 control-label">
        			<?php echo I18N::translate('Watermark font color'); ?>
        		</label>
    			<div class="col-sm-9">
    				<div class="row">
    				    <!--  MAJ_WM_FONT_COLOR -->
        				<div class="col-sm-3">
        					<div class="input-group">
        						<label class="input-group-addon" for="MAJ_WM_FONT_COLOR">
        							<?php echo I18N::translate('Color'); ?>
        						</label>
        						<input type="color" class="form-control" dir="ltr" id="MAJ_WM_FONT_COLOR" name="MAJ_WM_FONT_COLOR" value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_WM_FONT_COLOR', '#4D6DF3')); ?>" maxlength="11">
        					</div>
    					</div>
	   				</div>
    				<p class="small text-muted">
        				<?php echo I18N::translate('Font color for the watermark. By default, <span style="color:#4d6df3;">the color #4D6DF3</span> is used.'); ?>
        			</p>
        		</div>        		
        	</div>
        	        	
			<div class="form-group">
				<legend class="control-label col-sm-3">
					<?php echo I18N::translate('Watermark font size'); ?>
				</legend>
    			<div class="col-sm-9">    			
    				<div class="row">
    					<!--  MAJ_WM_FONT_MAXSIZE -->
    					<div class="col-sm-5">
        					<div class="input-group">
        						<label class="input-group-addon" for="MAJ_WM_FONT_MAXSIZE">
        							<?php echo I18N::translate('Maximum font size'); ?>
        						</label>
        						<input
        							class="form-control"
        							dir="ltr"
        							id="MAJ_WM_FONT_MAXSIZE"
        							maxlength="2"
        							name="MAJ_WM_FONT_MAXSIZE"
        							type="number"
        							placeholder="18"
        							value="<?php echo Filter::escapeHtml($module->getSetting('MAJ_WM_FONT_MAXSIZE')); ?>"
        							>        							
        						<span class="input-group-addon">
        							<?php echo I18N::translate('pixels'); ?>
        						</span>
        					</div>
    					</div>
    				</div>    			
    				<p class="small text-muted">
        				<?php echo I18N::translate('Watermark font size'); ?>
        			</p>
        		</div>        		
        	</div>
        	
        	<div class="form-group">
        		<div class="col-sm-offset-3 col-sm-9">
        			<button type="submit" class="btn btn-primary">
        				<i class="fa fa-check"></i>
        				<?php echo I18N::translate('save'); ?>
        			</button>
        		</div>
        	</div>
        	
        </form>
		
		<?php        
    }
74574
public function render()
    {
        if (!$this->visible) {
            return;
        }

        parent::render();

        if ($this->title !== null) {
            $label_tag = new SwatHtmlTag('label');
            $label_tag->for = $this->id . '_radio_button_' . $this->value;
            $label_tag->setContent($this->title, $this->content_type);
            $label_tag->open();
        }

        $radio_button_tag = new SwatHtmlTag('input');
        $radio_button_tag->type = 'radio';
        $radio_button_tag->name = $this->id;
        $radio_button_tag->id = $this->id . '_radio_button_' . $this->value;
        $radio_button_tag->value = $this->value;
        if (!$this->sensitive) {
            $radio_button_tag->disabled = 'disabled';
        }

        $view = $this->getFirstAncestor('SwatView');
        if ($view !== null) {
            $selection = $view->getSelection($this);
            if ($selection->contains($this->value)) {
                $radio_button_tag->checked = 'checked';
            }
        }

        echo '<span class="swat-radio-wrapper">';
        $radio_button_tag->display();
        echo '<span class="swat-radio-shim"></span>';
        echo '</span>';

        if ($this->title !== null) {
            $label_tag->displayContent();
            $label_tag->close();
        }
    }
375599
public function renderToolProspectsModalContainerAction() {
        
        $id = $this->params()->fromQuery('id');
        $view = new ViewModel();
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $view->melisKey = $melisKey;
        $view->id = $id;
        $view->setTerminal(true);
        return $view;
    }
753315
public function render()
    {
        /** @var TbForm $parent */
        $parent = $this->getParent();
        /** @var TbActiveForm $form */
        $form = $parent->getActiveFormWidget();
        /** @var CModel $model */
        $model = $parent->getModel();

        // Hidden fields do not require control groups.
        if ($this->type === TbHtml::INPUT_TYPE_HIDDEN) {
            return $form->hiddenField($model, $this->name, $this->attributes);
        }

        if (isset(self::$coreTypes[$this->type])) {
            $type = self::$coreTypes[$this->type];
        } else {
            $type = TbHtml::INPUT_TYPE_CUSTOM;
            $properties = $this->attributes;
            $properties['model'] = $model;
            $properties['attribute'] = $this->name;
            $this->attributes['input'] = $parent->getOwner()->widget($this->type, $properties, true);
        }

        return $form->createControlGroup($type, $model, $this->name, $this->attributes, $this->items);
    }
56367
public function renderControl()
    {
        if($this->hasAttribute('v-model')) {
            $this->value = null;
        }

        return view('antares/foundation::form.controls.' . $this->type, ['control' => $this]);
    }
1009884
public function renderToolModulesAction()
    {
        $translator      = $this->getServiceLocator()->get('translator');
        $moduleSvc       =  $this->getServiceLocator()->get('ModulesService');
        $coreTool        =  $this->getServiceLocator()->get('MelisCoreTool');
        $modules         = $moduleSvc->getAllModules();

        $melisKey = $this->params()->fromRoute('melisKey', '');
        $noAccessPrompt = '';

        if(!$this->hasAccess('meliscore_tool_user_module_management')) {
            $noAccessPrompt = $translator->translate('tr_tool_no_access');
        }

        $request = $this->getRequest();
        $domain = isset($get['domain']) ? $get['domain'] : null;
        $scheme = isset($get['scheme']) ? $get['scheme'] : null;
        $melisKey = $this->params()->fromRoute('melisKey', '');
        $netStatus = $coreTool->isConnected();

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        $view->modules = serialize($modules);
        $view->scheme  = $scheme;
        $view->domain  = $domain;
        $view->netStatus  = $netStatus;

        return $view;
    }
1358501
protected function renderSubForm()
    {
        $html = '';
        foreach ($this->form as $key => $input) {
            $html .= $this->renderInput($key, $input);
        }

        return $html;
    }
61534
public function renderToolProspectsHeaderRefreshAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');
        
        $view = new ViewModel();
        $view->melisKey = $melisKey;
        
        return $view;
    }
1119096
public function render()
    {
        $tabs_html = '';
        $tabs_header = '';
        $tabs_control = '';

        // Iterate loaded form tabs
        foreach ($this->tabs as $tab) {
            // Gather tabs data to differrent collections
            $tabs_html .= $tab->content();
            $tabs_header .= $tab->header();
            $tabs_control .= $tab->control();
        }

        // Render view
        return m()
            ->title('Форма')
            ->view('form/index')
            ->cmsmaterial($this->material)
            ->tabs($tabs_html)
            ->tabs_control($tabs_control)
            ->tabs_headers($tabs_header)
            ->output();
    }
1057994
public function render(): string
    {
        $view = $this->viewer->make($this->getView(), $this->getFormData());

        // Indicates that the form has been rendered at least once.
        // Then return its content.
        $this->rendered = true;

        return $view->render();
    }
434782
protected function renderBody()
	{
		foreach($this->tabs as $id=>$tab)
		{
			$inactive=$id!==$this->activeTab?' style="display:none"' : '';
			echo "<div class=\"view\" id=\"{$id}\"{$inactive}>\n";
			if(isset($tab['content']))
				echo $tab['content'];
			elseif(isset($tab['view']))
			{
				if(isset($tab['data']))
				{
					if(is_array($this->viewData))
						$data=array_merge($this->viewData, $tab['data']);
					else
						$data=$tab['data'];
				}
				else
					$data=$this->viewData;
				$this->getController()->renderPartial($tab['view'], $data);
			}
			echo "</div><!-- {$id} -->\n";
		}
	}
205555
public function renderParamsWrap()
    {
        $view = new \Zend\View\Model\ViewModel();

        $view->setTemplate('default-params');
        $view->setVariable('column', $this->getTable()->getParamAdapter()->getColumn());
        $view->setVariable('itemCountPerPage', $this->getTable()->getParamAdapter()->getItemCountPerPage());
        $view->setVariable('order', $this->getTable()->getParamAdapter()->getOrder());
        $view->setVariable('page', $this->getTable()->getParamAdapter()->getPage());
        $view->setVariable('quickSearch', $this->getTable()->getParamAdapter()->getQuickSearch());
        $view->setVariable('rowAction', $this->getTable()->getOptions()->getRowAction());

        return $this->getRenderer()->render($view);
    }
386763
public function render()
	{
		$element = $this->elementPrototype;
		/** @var BootstrapRenderer $renderer */
		$renderer = $this->row->getParent()->form->renderer;

		$element = $renderer->configElem(RendererConfig::gridCell, $element);
		$element->class[] = $this->createClass();

		if ($this->childControl) {
			$pairHtml = $renderer->renderPair($this->childControl);
			$element->addHtml($pairHtml);
		}

		return $element;
	}