Show content list with widget visibility options.

@return \Zend\Stdlib\ResponseInterface|\Zend\View\Model\ViewModel
342654
public function indexAction()
    {
        $visibilityService = $this->getVisibilityService();
        $options = $visibilityService->getOptions();

        $widgetId = $options->getWidgetId();
        if (! $widgetId) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The widget identifier was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/layout')
                ->setStatusCode(303);
        }

        $widget = $this->deriveWidget($widgetId);
        if (empty($widget)) {
            return $this->getResponse();
        }
        if ($this->getRequest()->isPost()) {
            $event = $this->request->getPost('suboperation');
            if (! empty($event)) {
                $events = $this->getEventManager();
                $params = $this->getRequest()->getPost();
                $params['widget_id'] = $widget->getId();
                $result = $events->trigger($event, $this, $params);
                if ($result->last() instanceof Response) {
                    return $result->last();
                }
            }
        }

        $view = new ViewModel;
        $view->options = $options;
        $view->widget = $widget;

        $moduleOptions = $this->getModuleOptions();
        $view->config = $moduleOptions->getWidgetByName($widget->getName());

        $view->list = $visibilityService->getContentList();
        $visibilityService->saveOptions();

        return $view;
    }
997256
public function listAction()
    {
        $table = $this->plugin->table;
        if (!is_null(arg('section')))
        {
            $table['condition'] = "`section`='" . arg('section', 'int') . "'";
        }
        $html = $this->ui->renderTable($table);
        return $html;
    }
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;
    }
805286
public function renderToolTemplateContentAction()
    {

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

        $translator = $this->getServiceLocator()->get('translator');


        // declare the Tool service that we will be using to completely create our tool.
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');

        // tell the Tool what configuration in the app.tool.php that will be used.
        $melisTool->setMelisToolKey('meliscms', 'meliscms_tool_templates');

        $view = new ViewModel();

        // get the columns that has been set in the configuration (app.tools.php)
        $columns = $melisTool->getColumns();

        // add an extra column which is Action
        $columns['actions'] = array('text' => $translator->translate('tr_meliscms_action'), 'css' => 'width:10%');

        // get the column texts set, this will be used in the thead table
        $view->tableColumns = $columns;


        // retrieve modals
        $view->templateModals = $melisTool->getAllModals();

        $view->melisKey = $melisKey;

        $view->getToolDataTableConfig = $melisTool->getDataTableConfiguration('#tableToolTemplateManager',false,false,array('order' => '[[ 0, "desc" ]]'));

        return $view;
    }
1106905
public function getContent()
    {
        // Check that the current user has permission to access this controller
        if (!app('decoy.user')->can('read', $this->controller)) {
            return;
        }

        // If in a sidebar and there is no parent (like if you are on a create page)
        // then don't show a special message
        if ($this->layout == 'sidebar' && !$this->parent_item) {
            return View::make('decoy::shared.list._pending', [
                'title' => $this->label_text,
                'description' => $this->controller->description(),
            ])->render();
        }

        // Get the listing of items
        $items = $this->getItems();

        // Get an instance of a model to call non-static methods on
        $model_class = $this->controller->model();
        $model_instance = new $model_class;

        // Create all the vars the standard list expects
        $vars = [
            'controller'        => $this->controller_name,
            'title'             => $this->label_text,
            'description'       => $this->controller->description(),
            'columns'           => $this->getColumns($this->controller),
            'search'            => $this->controller->search(),
            'convert_dates'     => 'date',
            'layout'            => $this->layout,
            'parent_id'         => null,
            'parent_controller' => null,
            'many_to_many'      => false,
            'listing'           => $items,
            'count'             => is_a($items, LengthAwarePaginator::class) ?
                $items->total() : $items->count(),
            'paginator_from'    => (request('page', 1)-1) * $this->perPage(),
            'with_trashed'      => $this->controller->withTrashed(),
            'is_exportable'     => $model_instance->isExportable(),
        ];

        // If the listing has a parent, add relationship vars
        if ($this->parent_item) {
            $vars = array_merge($vars, $this->controller->autocompleteViewVars());
        }

        // Return the view, passing in a bunch of variables
        return View::make('decoy::shared.list._standard', $vars)->render();
    }
1306591
public function renderToolUserModalEmptyAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

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

        return $view;
    }
621717
public function actionList()
    {
        $models = $this->getNewEntity()->fetchAll();
        $view = $this->createView('list');
        $view['content'] = $models;
        return $view;
    }
947515
public function index()
    {
        $templates = $this->template->where('active', 1)->where('type', 'default')->get();
        
        $pages = $this->page->get();
        
        return view('chuckcms::backend.templates.index', compact('templates', 'pages'));
    }
891002
public function view()
    {
        $code = $this->code();

        // If there are images supposed to appear on the editor, lets find them
        $imageList = [];
        if (isset($this->entity->images['class']) && $imageClass = $this->entity->images['class']) {
            $images = $imageClass::orderBy(isset($this->entity->images['field']) ? $this->entity->images['field'] : 'created_at',
                                           isset($this->entity->images['order']) ? $this->entity->images['order'] : 'desc')
                      ->get();

            foreach ($images as $image) {
                $value = isset($this->entity->images['value']) ?
                                $image->$this->entity->images['value'] :
                                $image->image_name;

                $imageList[] = [
                    'title' => (isset($this->entity->images['title']) ? $image->$this->entity->images['title'] : $image->description) ?: $value,
                    'value' => asset(rtrim($this->entity->images['path'], '/').'/'.$value),
                ];
            }
        }

        return view('panel::form', [
                        'entity'    => $this->entity,
                        'header'    => $this->header(),
                        'record'    => $this->record,
                        'title'     => $this->entity->title,
                        'panel'     => $this->record ? trans('panel::global.edit_entity', ['entity' => $this->entity->name()]) : trans('panel::global.save_entity', ['entity' => $this->entity->name()]),
                        'footer'    => $this->footer(),
                        'formCode'  => $code,
                        'imageList' => $imageList,
                    ]);
    }
1099529
public function index(): View
    {
        $config = [
            'title' => trans('HCResource::resource_grab_property.page_title'),
            'url' => route('admin.api.resource.grab.property'),
            'form' => route('admin.api.form-manager', ['resource.grab.property']),
            'headers' => $this->getTableColumns(),
            'actions' => ['search']
        ];

        return view('HCCore::admin.service.index', ['config' => $config]);
    }
1175259
public function indexAction(){
		$configForm = $this->getForm();
		$configForm->setData($this->getConfig());
		
		$view = new ViewModel(array('title' => $this->getEditTitle(), 'configForm' => $configForm));
		$view->setTemplate('xelax-site-config/site-config/index.phtml');
		return $view;
	}
1292048
public function content()
    {
        if ($this->app->getMatchRoute()) {
            $actionName = strtolower(preg_replace('/(?<=\d)(?=[A-Za-z])|(?<=[A-Za-z])(?=\d)|(?<=[a-z])(?=[A-Z])/', '-', $this->app->getActionName()));

            $fileArray = [
                strtolower($this->app->getModuleName()),
                str_replace('controller', '', strtolower($this->app->getControllerName())),
                $actionName . '.phtml'
            ];

            $file = implode('/', $fileArray);
        } else {
            $viewManager = $this->config->get('view_manager');
            $file = $viewManager['template_map']['error/404'];
        }

        $this->render($file);
    }
761066
private function clientRenderList()
    {
        if ($this->settings['useGroups'])
        {
            $view = new Gallery_ClientGroupedListView();
        }
        else
        {
            $view = new Gallery_ClientListView();
        }

        $html = $view->render();
        return $html;
    }
423743
public function index()
    {
        $result = $this->repository->paginated();

        return view('cms::modules.files.index')
            ->with('files', $result)
            ->with('pagination', $result->render());
    }
328125
public function showAction()
    {
        $this->isGranted('VIEW');

        $this->container->get('ekyna_admin.menu.builder')
            ->breadcrumbAppend('settings', 'ekyna_setting.parameter.label.plural');
        
        $manager = $this->getSettingsManager();
        $schemas = $this->getSettingsRegistry()->getSchemas();
        $settings = [];

        foreach($schemas as $namespace => $schema) {
            $settings[$namespace] = $manager->loadSettings($namespace);
        }

        return $this->render('EkynaSettingBundle:Settings:show.html.twig', [
            'settings'   => $settings,
            'labels'     => $manager->getLabels(),
            'templates'  => $manager->getShowTemplates(),
        ]);
    }
914613
public function actionVisible ()
		{
			if (Yii::$app->request->isAjax)
			{
				$id = Yii::$app->request->post('id');
				$menu = Menu::findOne($id);
				if ($menu !== null)
				{
					$menu->setAttribute('visible', $menu->visible == 1 ? 0 : 1);
					if (!$menu->save())
						echo Json::encode(current($menu->firstErrors));
					else
						echo $menu->visible;
				}
			}
			Yii::$app->end();
		}
488484
public function renderWidgetContainer()
    {
        Piwik::checkUserHasSomeViewAccess();
        $this->checkSitePermission();

        $view = new View('@CoreHome/widgetContainer');
        $view->isWidgetized = (bool) Common::getRequestVar('widget', 0, 'int');
        $view->containerId  = Common::getRequestVar('containerId', null, 'string');

        return $view->render();
    }