This function gets the datas and create an array of variables
that will be associated with the child view generated.
330118
public function front()
    {
        $pageId        = isset($this->pluginFrontConfig['pageIdFolder']) ? $this->pluginFrontConfig['pageIdFolder'] : 1;
        $listofpages   = [];
        $viewVariables = [];

        if($pageId) {

            // Getting the Subpages from MelisFrontNavigator
            $treeSrv = $this->getServiceLocator()->get('MelisEngineTree');
            $pages = $treeSrv->getPageChildren($pageId, 1);

            foreach ($pages as $key => $val)
            {
                /**
                 * Page content has a values of XML type
                 * so need to parse to make the content of the page easy to manage
                 *
                 * $xmlValues will handle the result of parsing
                 * this will return array
                 */
                $parser = xml_parser_create();
                xml_parse_into_struct($parser, $val->page_content, $xmlValues);
                xml_parser_free($parser);

                // This process will get only the Page content with the tags of MELISTAGS and has a Tag Id
                $pageContent = array();

                foreach ($xmlValues as $xKey => $xVal)
                {
                    if ($xVal['tag'] = 'MELISTAG')
                    {
                        if (!empty($xVal['attributes']['ID']))
                        {
                            if (!empty($xVal['value'])) {
                                // Adding the content tag using the tag Id with its value
                                $pageContent[$xVal['attributes']['ID']] = $xVal['value'];
                            }
                        }
                    }
                }

                $val->page_tags = $pageContent;

                array_push($listofpages, $val);
            }

            // Create an array with the variables that will be available in the view
            $viewVariables = array(
                'pageIdFolder' => $pageId,
                'pluginId' => $this->pluginFrontConfig['id'],
                'listofpages' => $listofpages
            );

        }

        // return the variable array and let the view be created
        return $viewVariables;
    }
157481
public function prepareVars()
    {
        $this->defineFilterScopes();
        $this->vars['cssClasses'] = implode(' ', $this->cssClasses);
        $this->vars['scopes'] = $this->allScopes;
    }
104447
def register_view(self, view):
        """"""
        super(ScopedVariableListController, self).register_view(view)

        view['name_col'].add_attribute(view['name_text'], 'text', self.NAME_STORAGE_ID)
        if not isinstance(self.model.state, LibraryState) and self.model.state.get_next_upper_library_root_state() is None:
            view['name_text'].set_property("editable", True)
        view['data_type_col'].add_attribute(view['data_type_text'], 'text', self.DATA_TYPE_NAME_STORAGE_ID)
        if not isinstance(self.model.state, LibraryState) and self.model.state.get_next_upper_library_root_state() is None:
            view['data_type_text'].set_property("editable", True)
        if isinstance(view, ScopedVariablesListView):
            view['default_value_col'].add_attribute(view['default_value_text'], 'text', self.DEFAULT_VALUE_STORAGE_ID)
            if not isinstance(self.model.state, LibraryState) and self.model.state.get_next_upper_library_root_state() is None:
                view['default_value_text'].set_property("editable", True)
            self._apply_value_on_edited_and_focus_out(view['default_value_text'],
                                                      self.apply_new_scoped_variable_default_value)

        self._apply_value_on_edited_and_focus_out(view['name_text'], self.apply_new_scoped_variable_name)
        self._apply_value_on_edited_and_focus_out(view['data_type_text'], self.apply_new_scoped_variable_type)

        if isinstance(self.model, ContainerStateModel):
            self.reload_scoped_variables_list_store()
215657
private function data($view) {


		$data['var'] = $this->module->get('var');

		if(isset($view['with']) ) {

			foreach((array) $view['with'] as $name => $value) {

				$data['var'][$name] = $value;
			}
		}

		$data['file'] = $this->getPath($view, $this->module->get('module'));


		return $data;
	}
928562
private void initVariables() {
		if (this.currentWindow == null) {
			this.currentWindow = new int[this.windowSize];
		}

		if (this.classDistributions == null) {
			this.classDistributions = new long[this.getModelContext().classAttribute().numValues()];
		}
	}
239046
function getChildVariable() {
            var indexArr = this.options.rowIndex.split('.');
            var lastIndex = indexArr[indexArr.length - 1];
            var fieldArr = this.options.field.split('.');
            var lastField = fieldArr[fieldArr.length - 1];
            var lastDataTable = this.dataModel;
            var lastRow = null;

            for (var i = 0; i < fieldArr.length; i++) {
                lastRow = lastDataTable.getRow(indexArr[i]);
                if (!lastRow) break;
                if (i < fieldArr.length - 1) {
                    lastDataTable = lastRow.getValue(fieldArr[i]);
                }
            }
            return {
                lastField: lastField,
                lastIndex: lastIndex,
                lastDataTable: lastDataTable,
                lastRow: lastRow
            };
        }
366710
protected function mergeVariables(string $view, array $variables): array
	{
		return $variables + $this->getAutoAssignVariables($view) + $this->globalVariables;
	}
823660
protected function assignViewVars()
    {
        global $wp_query;

        if (!is_null($this->controller) && !is_null($this->controller->view)) {
            foreach ($this->controller->view->getVariables() as $key => $value) {
                $wp_query->set($key, $value);
                $GLOBALS[$key] = $value;
            }
        }
    }
756605
protected function loadRelatedData()
    {
        // get all related Events:
        $events = [];
        if ($this->xPDOSimpleObject instanceof \modPlugin) {
            $pluginEvents = $this->xPDOSimpleObject->getMany('PluginEvents');
            /** @var \modPluginEvent $event */
            foreach ($pluginEvents as $event) {
                $data = $event->toArray();
                unset($data['id'], $data['pluginid']);
                $events[] = $data;
            }

            // will be loaded via setOnEvents from blend()
            $this->related_data = $events;
        }

        // Calls on the event: OnBlendLoadRelatedData
        parent::loadRelatedData();
    }
43049
def add_default_values_of_scoped_variables_to_scoped_data(self):
        
        for key, scoped_var in self.scoped_variables.items():
            self.scoped_data[str(scoped_var.data_port_id) + self.state_id] = \
                ScopedData(scoped_var.name, scoped_var.default_value, scoped_var.data_type, self.state_id,
                           ScopedVariable, parent=self)
527575
public function prepareVars()
    {
        // Refresh the loaded data to support being modified by filterFields
        // @see https://github.com/octobercms/october/issues/2613
        if (!self::$onAddItemCalled) {
            $this->processExistingItems();
        }

        if ($this->previewMode) {
            foreach ($this->formWidgets as $widget) {
                $widget->previewMode = true;
            }
        }

        $this->vars['indexInputName'] = $this->indexInputName;
        $this->vars['groupInputName'] = $this->groupInputName;

        $this->vars['prompt'] = $this->prompt;
        $this->vars['formWidgets'] = $this->formWidgets;
        $this->vars['titleFrom'] = $this->titleFrom;
        $this->vars['minItems'] = $this->minItems;
        $this->vars['maxItems'] = $this->maxItems;

        $this->vars['useGroups'] = $this->useGroups;
        $this->vars['groupDefinitions'] = $this->groupDefinitions;
    }
505434
function initViews () {
    // list of views - may be empty
    this.modelViews = []
    // if view is false no model views will be applied overriding any defaults
    if (this.args.view === false) {
        return
    }
    // get view from args or default
    var viewArg = defined(this.args.view) ? this.args.view : this.model.views.default
    // skip unless view arg is set from args or default
    if (!defined(viewArg)) {
        return
    }
    // list of views to apply to model
    var views
    // if view is string then convert to array
    if (typeof viewArg === 'string') {
        views = [viewArg]
    }
    // if view is array use it
    else if (Array.isArray(viewArg)) {
        views = viewArg
    }
    // invalid argument
    else {
        throw this.error('invalid view argument')
    }
    // iterate over views getting model view objects
    _.each(views, view => {
        var modelView = requireValidModelView(view, this.model.views, true)
        // if result is array then add all
        if (Array.isArray(modelView)) {
            _.each(modelView, modelView => this.modelViews.push(modelView))
        }
        // otherwise add object
        else {
            this.modelViews.push(modelView)
        }
    })
    // instantiate model view engine if there are views
    if (this.modelViews.length > 0) {
        this.modelViewEngine = new ImmutableCoreModelViewEngine({query: this})
    }
}
1043075
static function generateVariableCode( $php, $tpl, $node, &$knownTypes, $dataInspection, $parameters, &$resourceData )
    {
        $variableData = $node[2];
        $persistence = array();
        eZTemplateCompiler::generateVariableDataCode( $php, $tpl, $variableData, $knownTypes, $dataInspection, $persistence, $parameters, $resourceData );
    }
1131980
protected function generateView()
    {
        if ($this->option('parent') || $this->option('model') || $this->option('resource')) {
            if ($this->option('parent')) {
                $name = $this->qualifyClass('Model/ChildController');
            } else {
                $name = $this->qualifyClass('ModelController');
            }
            $path = $this->getViewPath($name);

            if (!$this->files->exists(str_replace_last('.blade.php', '/index.blade.php', $path))) {
                foreach ([ 'index', 'create', 'show', 'edit' ] as $key => $method) {
                    $this->makeDirectory(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path));
                    $this->files->put(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path), $this->buildView($name, $method));
                }
            }
        }

        $name = $this->qualifyClass($this->getNameInput());
        $path = $this->getViewPath($name);

        if ($this->option('parent') || $this->option('model') || $this->option('resource')) {
            foreach ([ 'index', 'create', 'show', 'edit' ] as $key => $method) {
                $this->makeDirectory(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path));
                $this->files->put(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path), $this->buildView($name, $method));
            }
        } else {
            $this->makeDirectory($path);
            $this->files->put($path, $this->buildView($name));
        }

        $this->info('View also generated successfully.');
    }
1057493
protected function _processViewArray()
    {
        $smarty = $this->_getSmarty();
        $outputProcessor = oxNew(\OxidEsales\Eshop\Core\Output::class);

        // processing all view data
        foreach ($this->_aViewData as $key => $value) {
            $smarty->assign($key, $value);
        }

        // processing assigned smarty variables
        $newSmartyArray = $outputProcessor->processViewArray($smarty->get_template_vars(), "oxemail");

        foreach ($newSmartyArray as $key => $val) {
            $smarty->assign($key, $val);
        }
    }
132502
public function prepareVars()
    {
        $this->vars['model'] = $this->model;
        $this->vars['items'] = $this->model->menus;

        $this->vars['emptyItem'] = [
            'label' => Lang::get('rainlab.builder::lang.menu.new_menu_item'),
            'icon' => 'icon-life-ring',
            'code' => 'newitemcode',
            'url' => '/'
        ];

        $this->vars['emptySubItem'] = [
            'label' => Lang::get('rainlab.builder::lang.menu.new_menu_item'),
            'icon' => 'icon-sitemap',
            'code' => 'newitemcode',
            'url' => '/'
        ];
    }
741446
def data(self):
        """"""
        if self._children:
            for child in self._children:
                self._action_data.setdefault('children', []).append(child.data)
        return self._action_data