Gets the view parameters and data to display
@return array
320431
protected function getViewData()
    {
        $delivery       = $this->hasRequestParameter('delivery')
            ? $this->getResource($this->getRequestParameter('delivery'))
            : null;
        $testCenter     = $this->hasRequestParameter('context')
            ? $this->getResource($this->getRequestParameter('context'))
            : null;
        $sessions       = $this->getRequestParameter('session');
        $requestOptions = $this->getRequestOptions([
            'sortby'      => 'timestamp',
            'sortorder'   => 'desc',
            'periodStart' => '',
            'periodEnd' => '',
            'detailed' => false
        ]);

        if (!is_array($sessions)) {
            $sessions = $sessions ? explode(',', $sessions) : [];
        }

        // log access to history
        $deliveryLog = $this->getServiceManager()->get(DeliveryLog::SERVICE_ID);
        foreach ($sessions as $sessionUri) {
            $deliveryLog->log($sessionUri, 'HISTORY', []);
        }

        // retrieve history
        $historyService = $this->getServiceManager()->get(TestSessionHistoryService::SERVICE_ID);
        $history = DataTableHelper::paginate($historyService->getSessionsHistory($sessions, $requestOptions), $requestOptions);

        $viewData = [
            'set'         => $history,
            'sessions'    => $sessions,
            'sortBy'      => $requestOptions['sortBy'],
            'sortOrder'   => $requestOptions['sortOrder'],
            'periodStart' => $requestOptions['periodStart'],
            'periodEnd'   => $requestOptions['periodEnd'],
            'monitoringUrl' => $historyService->getBackUrl($delivery),
        ];

        if ($testCenter) {
            $viewData['monitoringUrl'] .= (strpos($viewData['monitoringUrl'], '?') === false) ? '?' : '&';
            $viewData['monitoringUrl'] .= 'context=' . urlencode($testCenter->getUri());
            $viewData['context'] = $testCenter->getUri();
        }

        if ($delivery) {
            $viewData['delivery'] = $delivery->getUri();
        }

        if (count($sessions) > 1) {
            $viewData['title'] = __('Detailed Session History of a selection');
        } else {
            $deliveryExecution = ServiceProxy::singleton()->getDeliveryExecution($sessions[0]);
            $viewData['title'] = __('Detailed Session History of %s', $deliveryExecution->getLabel());
        }
        
        return $viewData;
    }
360191
protected function getSelectionParams()
    {
        $result = $this->getSession('media_crop_selection_params');

        if ($result) {
            if (!isset($result['mode'])) {
                $result['mode'] = self::SELECTION_MODE_NORMAL;
            }

            if (!isset($result['width'])) {
                $result['width'] = null;
            }

            if (!isset($result['height'])) {
                $result['height'] = null;
            }

            return $result;
        }

        return [
            'mode'   => self::SELECTION_MODE_NORMAL,
            'width'  => null,
            'height' => null
        ];
    }
459480
protected function getViewParameters(Request $request, Form $form = null, $data = null): array
    {
        $parameters = parent::getViewParameters($request, $form, $data);
        if ($this->family) {
            $parameters['family'] = $this->family;
        }

        return $parameters;
    }
615018
public function display()
    {
        //Get the view name
        $name = $this->getName();

        //set the state data to the view
        $this->_data = array_merge($this->_state->toArray(), $this->_data);

        //Assign the data of the model to the view
        if ($items = $this->_state->getList()) {
            $this->_data[ AnInflector::pluralize($name) ] = $items;
            $this->_data['items'] = $items;
        }

        if ($item = $this->_state->getItem()) {
            $this->_data[ AnInflector::singularize($name) ] = $item;
            $this->_data['item'] = $item;
        }

        return parent::display();
    }
1014181
public function getRequestParameters()
    {
        $aViewVariables = array();

        $aTmp = $this->GetAllInputFieldParameter();
        foreach (array_keys($aTmp) as $sTmpKey) {
            $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey];
        }
        $aTmp = $this->GetUserAddressData();
        foreach (array_keys($aTmp) as $sTmpKey) {
            $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey];
        }
        $aTmp = $this->GetPaymentTypeSpecifivParameter();
        foreach (array_keys($aTmp) as $sTmpKey) {
            $aViewVariables[$sTmpKey] = $aTmp[$sTmpKey];
        }

        return $aViewVariables;
    }
102580
protected function buildView()
    {
        if (isset($this->html)) {
            return array_filter([
                'html' => new HtmlString($this->html),
                'text' => $this->textView ?? null,
            ]);
        }

        if (isset($this->markdown)) {
            return $this->buildMarkdownView();
        }

        if (isset($this->view, $this->textView)) {
            return [$this->view, $this->textView];
        } elseif (isset($this->textView)) {
            return ['text' => $this->textView];
        }

        return $this->view;
    }
1297024
public static function getParam()
	{
		$paramFile = Yii::$app->params[Enum::PARAMS_FILE];
		$param = require($paramFile);

		if (!is_array($param)) return [];

		return $param;
	}
1068414
public function getViewportOptions()
    {
        $options = [];
        
        foreach ($this->getViewports() as $viewport) {
            $options[strtolower($viewport)] = $this->getViewportLabel($viewport);
        }
        
        return $options;
    }
662057
public function prepareTemplateParameters(View $view)
    {
        $data = $view->getData();

        if ($data instanceof FormInterface) {
            $data = [$view->getTemplateVar() => $data->getData(), 'form' => $data];
        } elseif (empty($data) || !is_array($data) || is_numeric((key($data)))) {
            $data = [$view->getTemplateVar() => $data];
        }

        if (isset($data['form']) && $data['form'] instanceof FormInterface) {
            $data['form'] = $data['form']->createView();
        }

        $templateData = $view->getTemplateData();
        if (is_callable($templateData)) {
            $templateData = call_user_func($templateData, $this, $view);
        }

        return array_merge($data, $templateData);
    }
1053056
protected function getViewData()
    {
        $paginator = $this
            ->grid
            ->getConfig()
            ->getDataProvider()
            ->getPaginator();
        # Laravel 4
        if (method_exists($paginator, 'getFrom')) {
            $from = $paginator->getFrom();
            $to = $paginator->getTo();
            $total = $paginator->getTotal();
        # Laravel 5
        } else {
            $from = $paginator->firstItem();
            $to = $paginator->lastItem();
            $total = $paginator->total();
        }
        return parent::getViewData() + compact('from', 'to', 'total');
    }
1080391
private function getParameters() {
		
		$url = '/' == $this->url{0} ? substr($this->url,1) : $this->url;
		
		// split parameters by slash
		$params = explode('/', $url);
		
		// reveal ajax calls and raw requests and cuts special prefix from URL
		if (array_key_exists(0, $params)) {
			
			switch ($params[0]) {
				
				case 'ajax':
					$this->ajax = $this->raw = TRUE;
					array_shift($params);
					break;
					
				case 'raw':
					$this->raw = TRUE;
					array_shift($params);
					break;
					
			}
			
		}
		
		return $params;
		
	}
1114190
private function _dataForView()
    {
        return [
            'collection_generator' => $this->_config['collection_generator'],
            'columns'              => $this->_getColumns(),
            'collection'           => $this->_collection,
            'paginator'            => $this->_config['paginator_presenter'],
            'table'                => $this,
            'extra'                => $this->_config['extra'],
        ];
    }
80537
protected function _getErrorData()
    {
        $data = [];

        $viewVars = $this->controller->viewVars;
        if (!empty($viewVars['_serialize'])) {
            foreach ($viewVars['_serialize'] as $v) {
                $data[$v] = $viewVars[$v];
            }
        }

        if (!empty($viewVars['error']) && Configure::read('debug')) {
            $data['exception'] = [
                'class' => get_class($viewVars['error']),
                'code' => $viewVars['error']->getCode(),
                'message' => $viewVars['error']->getMessage(),
            ];

            if (!isset($data['trace'])) {
                $data['trace'] = Debugger::formatTrace($viewVars['error']->getTrace(), [
                    'format' => 'array',
                    'args' => false
                ]);
            }
        }

        return $data;
    }
1268247
public function getRequestParameters()
    {
        // $page current page of the grid
        $page = (int) $this->getRequest()->get('page', 0);
        
        // $orderBy column name to sort datagrid records
        $orderBy = $this->getRequest()->get('sidx', false);
        
        // ASC | DESC $sort
        $sort = strtoupper($this->getRequest()->get('sord', 'asc'));
        
        // $records  number of records to display
        $records = (int) $this->getRequest()->get('rows', 0);
        
        // $search is search in the query
        $search = ($this->getRequest()->get('_search', false) === 'true');
 
        // $filters Filters from the search query
        $filters = (array) json_decode($this->getRequest()->get('filters', '{}'));
        
        // $masterRowId Id of the master grid record
        $masterGridRowId = (int) $this->getRequest()->get('masterGridRowId', 0);
        
        $parameters = array(
            'page'            => $page,
            'orderBy'         => $orderBy,
            'sort'            => $sort,
            'records'         => $records,
            'search'          => $search,
            'filters'         => $filters,
            'masterGridRowId' => $masterGridRowId
        );
        
        return $parameters;
    }
764351
public function getFilterParameters()
    {
        $http = eZHTTPTool::instance();
        $filterList = array();
        if ( $http->hasGetVariable( 'filter' ) )
        {
            foreach ( $http->getVariable( 'filter' ) as $filterCond )
            {
                list( $name, $value ) = explode( ':', $filterCond, 2 );
                $filterList[$name] = $value;
            }
        }

        return array( 'result' => $filterList );
    }
625794
public function views()
    {
        return [
            ADMINLTETEMPLATE_PATH.'/resources/views/auth'              =>
                resource_path('views/vendor/adminlte/auth'),
            ADMINLTETEMPLATE_PATH.'/resources/views/errors'            =>
                resource_path('views/vendor/adminlte/errors'),
            ADMINLTETEMPLATE_PATH.'/resources/views/layouts'           =>
                resource_path('views/vendor/adminlte/layouts'),
            ADMINLTETEMPLATE_PATH.'/resources/views/home.blade.php'    =>
                resource_path('views/vendor/adminlte/home.blade.php'),
            ADMINLTETEMPLATE_PATH.'/resources/views/welcome.blade.php' =>
                resource_path('views/welcome.blade.php'),
        ];
    }
314595
public function getViewsData() {
    $data = parent::getViewsData();
    $data['mentions_field_data']['table']['base']['help'] = t('Mentions entry');

    $data['mentions_field_data']['table']['wizard_id'] = 'mention';
    $data['mentions_field_data']['mid']['field']['id'] = 'mid';

    $data['mentions_field_data']['table']['group'] = t('Mentions');
    $data['mentions_field_data']['table']['entity type'] = 'mentions';

    $data['mentions_field_data']['table']['base']['title'] = t('Mentions');

    $data['mentions_field_data']['table']['base']['weight'] = 1;
    $data['mentions_field_data']['table']['base']['defaults']['field'] = 'mid';

    $data['mentions_field_data']['mid'] = [
      'title' => t('Mention ID'),
      'help' => t('Mention ID'),
      'field' => [
        'id' => 'numeric',
      ],
    ];

    $data['mentions_field_data']['entity_type'] = [
      'title' => t('Entity type'),
      'help' => t('Entity type of entity that contains mention'),
      'field' => [
        'id' => 'standard',
      ],
      'filter' => [
        'id' => 'standard',
      ],
    ];

    $data['mentions_field_data']['title'] = [
      'title' => t('Title'),
      'help' => t('Title of entity containing mention'),
      'real field' => 'mid',
      'field' => [
        'id' => 'mentions_title',
      ],
      'relationship' => [
        'base' => 'node_field_data',
        'base field' => 'title',
        'relationship field' => 'nid',
        'title' => t('Mention Title'),
        'help' => t('Mention Title'),
        'id' => 'standard',
        'label' => t('Mention Title'),
      ],
    ];

    $data['mentions_field_data']['auid'] = [
      'title' => t('Author user id'),
      'help' => t('Author user id'),
      'filter' => [
        'id' => 'standard',
      ],
      'argument' => [
        'id' => 'standard',
      ],
      'field' => [
        'id' => 'standard',
      ],
      'relationship' => [
        'base' => 'users',
        'title' => t('User'),
        'help' => t('The user that authored the mention'),
        'id' => 'standard',
        'label' => t('Mentions user'),
      ],
    ];

    $data['mentions_field_data']['uid'] = [
      'title' => t('Mentioned user uid'),
      'help' => t('The user that is mentioned'),
      'relationship' => [
        'base' => 'users',
        'title' => t('User'),
        'help' => t('The user that is mentioned'),
        'id' => 'standard',
        'label' => t('Mentions user'),
      ],
      'filter' => [
        'id' => 'standard',
      ],
      'argument' => [
        'id' => 'standard',
      ],
      'field' => [
        'id' => 'standard',
      ],
    ];

    $data['mentions_field_data']['created'] = [
      'title' => t('Date'),
      'help' => t('Date'),
      'field' => [
        'id' => 'date',
      ],
      'sort' => [
        'id' => 'date',
      ],
      'argument' => [
        'id' => 'date',
      ],
    ];

    $data['mentions_field_data']['entity_id'] = [
      'title' => t('Entity id'),
      'help' => t('The unique ID of the object that contains mention'),
      'field' => [
        'id' => 'standard',
      ],
      'sort' => [
        'id' => 'standard',
      ],
      'argument' => [
        'id' => 'numeric',
      ],
    ];

    $data['mentions_field_data']['link'] = [
      'title' => t('Link'),
      'real field' => 'mid',
      'help' => t('Link to entity that contains mention'),
      'field' => [
        'id' => 'mentions_link',
      ],
    ];

    return $data;
  }