Renders to the Edit button inside the table content (Action column)
@return \Zend\View\Model\ViewModel
514492
public function renderToolUserContentActionEditAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

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

        return $view;
    }
1251211
public function renderTreeToolsAction(): ViewModel
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        /** @var \MelisCore\Service\MelisCoreConfigService $melisAppConfig */
        $melisAppConfig = $this->getServiceLocator()->get('MelisCoreConfig');
        $melisKeys = $melisAppConfig->getMelisKeys();

        // Get the order list for ordering tools
        $appconfigpath = $melisKeys[$melisKey];

        $appsConfig = $melisAppConfig->getItem($appconfigpath);


        $orderInterface = $melisAppConfig->getOrderInterfaceConfig($melisKey);
        $tools = [];

        /** @var \MelisCore\Service\MelisCoreAuthService $melisCoreAuth */
        $melisCoreAuth = $this->getServiceLocator()->get('MelisCoreAuth');

        /** @var \MelisCore\Service\MelisCoreRightsService $melisCoreRights */
        $melisCoreRights = $this->getServiceLocator()->get('MelisCoreRights');
        $xmlRights = $melisCoreAuth->getAuthRights();

        // Merge config if melisKey is "Others"
        if ($melisKey == 'melisothers_toolstree_section') {
            $appsConfig['interface'] = ArrayUtils::merge($appsConfig['interface'], $this->moveToolsToOthersCategory());
        }

        if (isset($appsConfig['interface']) && !empty($appsConfig['interface'])) {
            // Show sections first

            foreach ($appsConfig['interface'] as $key => $toolSectionName) {
                $isNavChild = false;

                if ($melisCoreRights->canAccess($key)) {

                    $tools[$key] = [
                        'toolsection_id' => $toolSectionName['conf']['id'] ?? $key,
                        'toolsection_name' => $toolSectionName['conf']['name'] ?? $key,
                        'toolsection_meliskey' => $toolSectionName['conf']['melisKey'] ?? $key,
                        'toolsection_icon' => $toolSectionName['conf']['icon'] ?? 'fa-cube',
                        'toolsection_forward' => $toolSectionName['forward'] ?? [],
                        'toolsection_children' => [],
                        'toolsection_is_tool' => isset($toolSectionName['forward']) && !empty($toolSectionName['forward']) ? true : false,
                    ];

                    // Second level, tools
                    if (isset($toolSectionName['interface'])) {
                        foreach ($toolSectionName['interface'] as $keyTool => $toolName) {
                            $isToolNavChild = false;

                            $icon = (!empty($toolName['conf']['icon'])) ? $toolName['conf']['icon'] : 'fa-cube';

                            if ($icon) {
                                $isNavChild = true;
                            }

                            if ($melisCoreRights->canAccess($keyTool)) {
                                $tools[$key]['toolsection_children'][$keyTool] = [
                                    'tool_id' => $toolName['conf']['id'] ?? $keyTool,
                                    'tool_name' => $toolName['conf']['name'] ?? "<strike>$keyTool</strike>",
                                    'tool_icon' => $icon,
                                    'tool_forward' => isset($toolName['forward']) ? $toolName['forward'] : [],
                                    'tool_melisKey' => $toolName['conf']['melisKey'] ?? $keyTool,
                                    'toolsection_is_tool' => isset($toolName['forward']) && !empty($toolName['forward']) ? true : false
                                ];
                            }

                            // add third level for tool others
                            if ($melisKey == 'melisothers_toolstree_section') {
                                if (isset($toolName['interface'])) {

                                    // third level, child tools
                                    foreach ($toolName['interface'] as $childKeyTool => $childToolname) {
                                        $icon = (!empty($childToolname['conf']['icon'])) ? $childToolname['conf']['icon'] : 'fa-cube';

                                        if ($icon) {
                                            $isToolNavChild = true;
                                        }

                                        if ($melisCoreRights->canAccess($childKeyTool)) {
                                            $tools[$key]['toolsection_children'][$keyTool]['toolsection_children'][$childKeyTool] = [
                                                'tool_id' => $childToolname['conf']['id'] ?? $keyTool,
                                                'tool_name' => $childToolname['conf']['name'] ?? "<strike>$childKeyTool</strike>",
                                                'tool_icon' => $icon,
                                                'tool_forward' => isset($childToolname['forward']) ? $childToolname['forward'] : [],
                                                'tool_melisKey' => $childToolname['conf']['melisKey'] ?? $keyTool,
                                                'toolsection_is_tool' => isset($childToolname['forward']) && !empty($childToolname['forward']) ? true : false
                                            ];
                                        }

                                    }

                                }

                            }
                            $tools[$key]['toolsection_children'][$keyTool]['toolsection_has_nav_child'] = $isToolNavChild;
                        }
                    }
                }


                $tools[$key]['toolsection_has_nav_child'] = $isNavChild;
            }
        } else {
            // for parent tool
            if (isset($appsConfig['conf']['is_parent_tool']) && $appsConfig['conf']['is_parent_tool']) {
                if ($melisCoreRights->canAccess($melisKey)) {
                    $tools[$melisKey] = $appsConfig;
                }
            }
        }

        $sections = $tools;

        // Reordering sections
        $toolsOrdered = [];
        foreach ($orderInterface as $orderKeySection => $sectionTools) {
            if (!empty($sections[$orderKeySection])) {
                if (empty($toolsOrdered[$orderKeySection])) {
                    $toolsOrdered[$orderKeySection] = [];
                }
                $toolsOrdered[$orderKeySection] = $tools[$orderKeySection];
                unset($toolsOrdered[$orderKeySection]['toolsection_children']);
                unset($sections[$orderKeySection]);
            }
        }
        foreach ($sections as $keyInterfaceSection => $childinterface) {
            if (empty($toolsOrdered[$keyInterfaceSection])) {
                $toolsOrdered[$keyInterfaceSection] = [];
            }
            $toolsOrdered[$keyInterfaceSection] = $tools[$keyInterfaceSection];
            unset($toolsOrdered[$keyInterfaceSection]['toolsection_children']);
        }

        // Reordering tools inside sections
        foreach ($toolsOrdered as $keySection => $toolsSection) {
            $sectionOrderInterface = [];
            if (!empty($orderInterface[$keySection])) {
                $sectionOrderInterface = $orderInterface[$keySection];
            }
            $toolsSectionOrdered = [];

            foreach ($sectionOrderInterface as $orderKey) {
                if (!empty($tools[$keySection]['toolsection_children'][$orderKey])) {
                    $toolsOrdered[$keySection]['toolsection_children'][$orderKey] = $tools[$keySection]['toolsection_children'][$orderKey];
                    unset($tools[$keySection]['toolsection_children'][$orderKey]);
                }
            }

            if (isset($tools[$keySection]['toolsection_children'])) {
                foreach ($tools[$keySection]['toolsection_children'] as $keyInterface => $childinterface) {
                    $toolsOrdered[$keySection]['toolsection_children'][$keyInterface] = $childinterface;
                }
            }
        }

        $view = new ViewModel();

        $view->tools = $toolsOrdered;
        $view->melisKey = $melisKey;
        return $view;
    }
739941
public function run()
    {
        if ($this->hasModel()) {
            $replace['{input}'] = Html::activeTextInput($this->model, $this->attribute, $this->options);
        } else {
            $replace['{input}'] = Html::textInput($this->name, $this->value, $this->options);
        }

        $replace['{button}'] = Html::tag($this->buttonTag, $this->buttonName, $this->buttonOptions);
        $replace['{reset-button}'] = Html::tag($this->resetButtonTag, $this->resetButtonName, $this->resetButtonOptions);

        FileInputAsset::register($this->view);

        if (!empty($this->callbackBeforeInsert)) {
            $this->view->registerJs('
                $("#' . $this->options['id'] . '").on("fileInsert", ' . $this->callbackBeforeInsert . ');'
            );
        }

        $modal = $this->renderFile('@vendor/ut8ia/yii2-filemanager/views/file/modal.php', [
            'inputId' => $this->options['id'],
            'btnId' => $this->buttonOptions['id'],
            'frameId' => $this->options['id'] . '-frame',
            'frameSrc' => Url::to($this->frameSrc), 
            'thumb' => $this->thumb,
            'imageContainer' => $this->imageContainer,
            'pasteData' => $this->pasteData,
        ]);

        return strtr($this->template, $replace) . $modal;
    }
967522
public function render()
    {
        parent::render();

        $this->_aViewData['edit'] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

        $soxId = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oArticle->load($soxId);

            if ($oArticle->isDerived()) {
                $this->_aViewData["readonly"] = true;
            }
        }

        $iAoc = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc");
        if ($iAoc == 1) {
            $oArticleAttributeAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\ArticleAttributeAjax::class);
            $this->_aViewData['oxajax'] = $oArticleAttributeAjax->getColumns();

            return "popups/article_attribute.tpl";
        } elseif ($iAoc == 2) {
            $oArticleSelectionAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\ArticleSelectionAjax::class);
            $this->_aViewData['oxajax'] = $oArticleSelectionAjax->getColumns();

            return "popups/article_selection.tpl";
        }

        return "article_attribute.tpl";
    }
413858
public function render()
    {
        $this->removeIDFilterIfNeeded();

        if (empty($this->filters)) {
            return '';
        }

        return view($this->view)->with([
            'action'   => $this->action ?: $this->urlWithoutFilters(),
            'layout'   => $this->layout,
            'filterID' => $this->filterID,
            'expand'   => $this->expand,
        ])->render();
    }
583199
protected function renderDataTable()
    {
        $html = "<table " . ($this->tableId ? "id=\"{$this->tableId}\" " : "") . "border=\"1\">\n<thead>\n\t<tr>\n";

        foreach ($this->allColumns as $name => $toDisplay) {
            if ($toDisplay !== false) {
                if ($name === 0) {
                    $name = 'value';
                }
                if ($this->translateColumnNames) {
                    $name = $this->translateColumnName($name);
                }
                $html .= "\t\t<th>$name</th>\n";
            }
        }

        $html .= "\t</tr>\n</thead>\n<tbody>\n";

        foreach ($this->tableStructure as $row) {
            $html .= "\t<tr>\n";
            foreach ($this->allColumns as $name => $toDisplay) {
                if ($toDisplay !== false) {
                    $value = "-";
                    if (isset($row[$name])) {
                        if (is_array($row[$name])) {
                            $value = "<pre>" . self::formatValueXml(var_export($row[$name], true)) . "</pre>";
                        } else {
                            $value = self::formatValueXml($row[$name]);
                        }
                    }

                    $html .= "\t\t<td>$value</td>\n";
                }
            }
            $html .= "\t</tr>\n";
        }

        $html .= "</tbody>\n</table>\n";

        return $html;
    }
1092769
public function renderToolProspectsWidgetsContentAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');
    
        $view = new ViewModel();
        $view->melisKey = $melisKey;
    
        return $view;
    }
194106
protected function renderToggleButton()
    {
        if (!isset($this->toggleButtonOptions['options']['data-target'])) {
            $this->toggleButtonOptions['options']['data-target'] = $this->options['id'];
        }
        Html::addCssClass($this->toggleButtonOptions['options'], ['toggle-button' => 'dropdown-trigger']);

        return Button::widget($this->toggleButtonOptions);
    }
826033
private function edit()
    {
        $columns = [];
        $values = [];
        //
        if ($this->_tracked) {
            $this->edited_at = Time::current();
        }
        //
        foreach ($this->_columns as $value) {
            if ($value != $this->_keyName) {
                $columns[] = $value;
                $values[] = empty($this->$value) ? null : $this->$value;
            }
        }
        //
        return $this->update($columns, $values);
    }
43935
public function render()
    {
        $columns = $this->options[self::GRID_PARAM_COLUMNS];

        if ($this->hasAtLeastOneFilter()) {
            $head = $this->createTableHeader(array(
                $this->createTopHeadingRow($columns),
                $this->createBottomHeadingRow($columns)
            ));
        } else {
            $head = $this->createTableHeader(array(
                $this->createTopHeadingRow($columns)
            ));
        }

        $body = $this->createTableBody($this->createBodyRows($columns, $this->data));

        return $this->createTable(array($head, $body))
                    ->render();
    }
331236
public function editAction( $id = null ) {
		$request = $this->getRequest();

		$pageId      = $request->get( 'pageId' );
		$formFieldId = $request->get( 'formFieldId' );
		$uniqId      = $request->get( 'uniqId' );
		$code        = $request->get( 'code', 'networking_init_cms.admin.page' );


		$layoutBlock = $this->admin->getObject( $id );

		/** @var $form \Symfony\Component\Form\Form */
		$form = $this->admin->getForm();
		$form->setData( $layoutBlock );

		$form->handleRequest( $request );
		$response = null;

		if ( $form->isSubmitted() ) {
			if ( $form->isValid() ) {
				$this->admin->update( $layoutBlock );
				$html   = $this->getLayoutBlockFormWidget( $pageId, $formFieldId, $uniqId, $code );
				$status = 200;

				return new Response( $html, $status );
			} else {
				$this->error = true;

				$response = new Response();
				$response->setStatusCode( 500 );
			}

		}

		$view = $form->createView();

		// set the theme for the current Admin Form
		$this->get( 'twig' )->getRuntime( FormRenderer::class )->setTheme( $view, $this->admin->getFormTheme() );

		return $this->renderWithExtraParams(
			'@NetworkingInitCms/PageAdmin/layout_block_edit.html.twig',
			[
				'action' => 'create',
				'form'   => $view,
				'object' => $layoutBlock,
			],
			$response
		);
	}
148938
protected function renderButtons()
    {
        $buttons = [];
        foreach ($this->buttons as $button) {
            if (is_array($button)) {
                $button['view'] = $this->getView();
                $button['defaultClass'] = false;
                if (!isset($button['encodeLabel'])) {
                    $button['encodeLabel'] = $this->encodeLabels;
                }
                $buttons[] = Html::tag('li', Button::widget($button));
            } else {
                $buttons[] = Html::tag('li', $button);
            }
        }

        return implode("\n", $buttons);
    }
944650
private function render()
    {
        if (empty($this->element)) {
            $this->textInput();
        }
        
        if (!isset($this->parts['{label}'])) {
            $this->label($this->label);
        }
        
        if (!isset($this->parts['{initValue}'])) {
            $this->initValue(null);
        }
    
        return str_replace([
            '{label}', '{initValue}', '{model}',
        ], [
            $this->parts['{label}'],
            $this->parts['{initValue}'],
            $this->getNgModel(),
        ], $this->element);
    }
627040
public function editAction()
    {
        $id = $this->params()->fromRoute('id');
        if (! is_numeric($id)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The category ID was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        try {
            $category = $this->getCategoryService()->getCategory($id);
        } catch (RuntimeException $e) {
            $this->flashMessenger()->addMessage($e->getMessage());
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }
        $form = $this->getCategoryForm();
        $form->setAttribute(
            'action',
            $this->url()->fromRoute('sc-admin/category/edit', ['id' => $id])
        );
        $form->bind($category);

        if ($this->getRequest()->isPost()) {
            $form->setData($this->getRequest()->getPost());
            if ($form->isValid()) {
                $this->getCategoryService()->saveContent($form->getData());
            }
        }

        return new ViewModel([
            'content' => $category,
            'form' => $form,
        ]);
    }
467153
public function renderButton()
    {
        if (($button = $this->button) !== false) {
            $tag = ArrayHelper::remove($button, 'tag', 'a');
            $label = ArrayHelper::remove($button, 'label',
                Inflector::camel2words(Inflector::id2camel($this->scenario)));
            if ($tag === 'button' && !isset($button['type'])) {
                $toggleButton['type'] = 'button';
            }

            if ($button['disabled']) {
                $button = ArrayHelper::merge([
                    'onClick' => new JsExpression('return false'),
                ], $button);
            } else {
                $button = ArrayHelper::merge([
                    'data-toggle' => 'modal',
                    'data-target' => "#{$this->getModalId()}",
                ], $button);
            }

            if ($tag === 'a' && empty($button['href'])) {
                $button['href'] = '#';
            }

            echo Html::tag($tag, $label, $button);
        }
    }
1165855
protected function renderContent() {
        
        $table_id = $this->data->get('table_id');
        
        ?>        
        <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>
		
		<div align="center">
			<div id="tabs">
				<form method="post" action="#">
					<?php echo Filter::getCsrf(); ?>
					<input type="hidden" name="action" value="update">
					<table id="<?php echo $table_id; ?>" class="table table-bordered table-condensed table-hover table-site-changes" >
						<thead>
							<tr>
								<th><?php echo I18N::translate('Enabled'); ?></th>
								<th>ENABLED_SORT</th>
								<th><?php echo I18N::translate('Hook Function'); ?></th>
								<th><?php echo I18N::translate('Hook Context'); ?></th>
								<th><?php echo I18N::translate('Module Name'); ?></th>
								<th><?php echo I18N::translate('Priority (1 is high)'); ?></th>
								<th>PRIORITY_SORT</th>
							</tr>
						</thead>
						<tbody> 
							<?php  
							$hooks = $this->data->get('hook_list');
							foreach ($hooks as $hook) { 
							?>
							<tr>
								<td>
									<input type="hidden" name="hook-<?php echo $hook->id;?>" value="yes" >
									<?php echo FunctionsEdit::twoStateCheckbox('status-'.($hook->id), ($hook->status)=='enabled'); ?>
								</td>
								<td><?php echo (($hook->status)=='enabled'); ?></td>
								<td><?php echo $hook->hook; ?></td>
								<td><?php echo $hook->context; ?></td>
								<td><?php if($mod = Module::getModuleByName($hook->module)) echo $mod->getTitle(); ?></td>
								<td><input type="text" class="center" size="2" value="<?php echo $hook->priority; ?>" name="moduleorder-<?php echo $hook->id; ?>" /></td>
								<td><?php echo $hook->priority; ?></td>
							</tr>
							<?php  } ?>
						</tbody>
					</table>
					<input type="submit" class="btn btn-primary save" value="<?php echo I18N::translate('save'); ?>">
				</form>
			</div>
		</div>	
		
		<?php        
    }
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();
    }