Initializes the components for the layout and page.
@return void
495188
protected function initComponents()
    {
        if (!$this->layout->isFallBack()) {
            foreach ($this->layout->settings['components'] as $component => $properties) {
                list($name, $alias) = strpos($component, ' ')
                    ? explode(' ', $component)
                    : [$component, $component];

                $this->addComponent($name, $alias, $properties, true);
            }
        }

        foreach ($this->page->settings['components'] as $component => $properties) {
            list($name, $alias) = strpos($component, ' ')
                ? explode(' ', $component)
                : [$component, $component];

            $this->addComponent($name, $alias, $properties);
        }

        /**
         * @event cms.page.initComponents
         * Fires after the components for the given page have been initialized
         *
         * Example usage:
         *
         *     Event::listen('cms.page.initComponents', function ((\Cms\Classes\Controller) $controller, (\Cms\Classes\Page) $page, (\Cms\Classes\Layout) $layout) {
         *         \Log::info($page->title . ' components have been initialized');
         *     });
         *
         * Or
         *
         *     $CmsController->bindEvent('page.initComponents', function ((\Cms\Classes\Page) $page, (\Cms\Classes\Layout) $layout) {
         *         \Log::info($page->title . ' components have been initialized');
         *     });
         *
         */
        $this->fireSystemEvent('cms.page.initComponents', [$this->page, $this->layout]);
    }
788678
public function initialize()
    {
        //Loads components
        //The configuration for `AuthComponent`  takes place in the same class
        $this->loadComponent('MeCms.Auth');
        $this->loadComponent('MeTools.Flash');
        $this->loadComponent('RequestHandler', ['enableBeforeRedirect' => false]);
        $this->loadComponent('MeTools.Uploader');
        $this->loadComponent('Recaptcha.Recaptcha', [
            'sitekey' => getConfigOrFail('Recaptcha.public'),
            'secret' => getConfigOrFail('Recaptcha.private'),
            'lang' => substr(I18n::getLocale(), 0, 2),
        ]);

        parent::initialize();
    }
550133
public function init() {
		
		$this->addCssClass($this->htmlOptions, 'panel');
		
		if($this->isValidContext())
			self::addCssClass($this->htmlOptions, 'panel-'.$this->getContextClass());

		if ($this->padContent)
			self::addCssClass($this->contentHtmlOptions, 'panel-body');

		if (!isset($this->contentHtmlOptions['id'])) {
			$this->contentHtmlOptions['id'] = $this->getId();
		}

		if (isset($this->headerHtmlOptions['class'])) {
			$this->headerHtmlOptions['class'] = 'panel-heading ' . $this->headerHtmlOptions['class'];
		} else {
			$this->headerHtmlOptions['class'] = 'panel-heading';
		}

		echo CHtml::openTag('div', $this->htmlOptions);

		$this->renderHeader();
		$this->renderContentBegin();
	}
1187438
public function init()
    {
        add_action('admin_head', array($this, 'addJsVariables'));
        add_action('admin_enqueue_scripts', array($this, 'enqueue'));
        add_action('current_screen', function ($current_screen) {
            add_action('views_edit-' . $current_screen->post_type, array($this, 'addFilterUrlParams'));
        });
    }
794083
public function init()
    {
        // Get services
        $services = $this->getServices();

        // Register all
        foreach ($services as $alias => $service) {
            $this->add($service, $alias);
        }

        // Register configurations
        $this->initConfigs();

        // Register post types / terms / widgets / admin pages and more
        $this->registerComponents();
    }
111297
public function init()
    {
        $this->nextPageLabel  = Module::t('Next') . ' &raquo;';
        $this->prevPageLabel  = '&laquo; ' . Module::t('Prev.');
        $this->firstPageLabel = Module::t('First');
        $this->lastPageLabel  = Module::t('Last');

        parent::init();
    }
43264
private void initLayout() {

        VerticalLayout page = new VerticalLayout();
        setContent(page);
        page.setId("page");

        page.addComponent(headerLayout);
        initLayoutHeader();

        page.addComponent(mainTab);


        initLayoutFooter();
        page.addComponent(layoutFooter);

    }
613419
private void initComponents() {

		pnlSummary = new javax.swing.JPanel();
		lblSummary = new javax.swing.JLabel();
		lblSummaryValue = new javax.swing.JLabel();
		pnlEmptiesSummary = new javax.swing.JPanel();
		jScrollConcepts = new javax.swing.JScrollPane();
		jScrollRoles = new javax.swing.JScrollPane();

		setFont(new java.awt.Font("Arial", 0, 18)); // NOI18N
		setMinimumSize(new java.awt.Dimension(520, 400));
		setPreferredSize(new java.awt.Dimension(520, 400));
		setLayout(new java.awt.BorderLayout());

		pnlSummary.setMinimumSize(new java.awt.Dimension(156, 23));
		pnlSummary.setPreferredSize(new java.awt.Dimension(156, 23));
		pnlSummary.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

		lblSummary.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
		lblSummary.setText("Empty concepts and roles");
		pnlSummary.add(lblSummary);

		lblSummaryValue.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
		pnlSummary.add(lblSummaryValue);

		add(pnlSummary, java.awt.BorderLayout.NORTH);

		pnlEmptiesSummary.setLayout(new javax.swing.BoxLayout(pnlEmptiesSummary, javax.swing.BoxLayout.PAGE_AXIS));
		pnlEmptiesSummary.add(jScrollConcepts);

		jScrollRoles.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
		pnlEmptiesSummary.add(jScrollRoles);

		add(pnlEmptiesSummary, java.awt.BorderLayout.CENTER);
	}
44532
public function init()
    {
        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $configs = include $this->filepath;

        // Add sidebars
        $this->addSidebars($configs);
    }
769540
public function setupLayout()
    {
        if (isset($this->layout) && !is_null($this->layout)) {
            $data = array();
            // Enter here data that have to be accessible everywhere
            $this->layout = view($this->layout, $data);
        }
    }
409431
protected function initLayout()
    {
        if ($this->layout === null) {
            $this->layout = 'Generic';
        }

        if (is_string($this->layout) || is_array($this->layout)) {
            $this->layout = $this->factory($this->layout, ['form'=>$this], 'FormLayout');
            $this->layout = $this->add($this->layout);
        } elseif (is_object($this->layout)) {
            $this->layout->form = $this;
            $this->add($this->layout);
        } else {
            throw new Exception(['Unsupported specification of form layout. Can be array, string or object', 'layout' => $this->layout]);
        }

        // Add save button in layout
        if ($this->buttonSave) {
            $this->buttonSave = $this->layout->addButton($this->buttonSave);
            $this->buttonSave->setAttr('tabindex', 0);
            $this->buttonSave->on('click', $this->js()->form('submit'));
            $this->buttonSave->on('keypress', new jsExpression('if (event.keyCode === 13){$([name]).form("submit");}', ['name' => '#'.$this->name]));
        }
    }
1104487
private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        pnlSavedQuery = new javax.swing.JPanel();
        scrSavedQuery = new javax.swing.JScrollPane();
        treSavedQuery = new javax.swing.JTree();
        pnlCommandPanel = new javax.swing.JPanel();
        lblSavedQuery = new javax.swing.JLabel();
        cmdRemove = new javax.swing.JButton();
        cmdAdd = new javax.swing.JButton();

        setLayout(new java.awt.BorderLayout());

        pnlSavedQuery.setMinimumSize(new java.awt.Dimension(200, 50));
        pnlSavedQuery.setLayout(new java.awt.BorderLayout());

        scrSavedQuery.setMinimumSize(new java.awt.Dimension(400, 200));
        scrSavedQuery.setOpaque(false);
        scrSavedQuery.setPreferredSize(new java.awt.Dimension(300, 200));

        treSavedQuery.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        treSavedQuery.setForeground(new java.awt.Color(51, 51, 51));
        treSavedQuery.setModel(queryControllerModel);
        treSavedQuery.setCellRenderer(new SavedQueriesTreeCellRenderer());
        treSavedQuery.setMaximumSize(new java.awt.Dimension(5000, 5000));
        treSavedQuery.setRootVisible(false);
        treSavedQuery.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                reselectQueryNode(evt);
            }
        });
        treSavedQuery.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {
            public void valueChanged(javax.swing.event.TreeSelectionEvent evt) {
                selectQueryNode(evt);
            }
        });
        scrSavedQuery.setViewportView(treSavedQuery);

        pnlSavedQuery.add(scrSavedQuery, java.awt.BorderLayout.CENTER);

        pnlCommandPanel.setLayout(new java.awt.GridBagLayout());

        lblSavedQuery.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblSavedQuery.setForeground(new java.awt.Color(153, 153, 153));
        lblSavedQuery.setText("Stored Query:");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints.weightx = 1.5;
        pnlCommandPanel.add(lblSavedQuery, gridBagConstraints);

        cmdRemove.setIcon(IconLoader.getImageIcon("images/minus.png"));
        cmdRemove.setText("Remove");
        cmdRemove.setToolTipText("Remove the selected query");
        cmdRemove.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        cmdRemove.setContentAreaFilled(false);
        cmdRemove.setIconTextGap(5);
        cmdRemove.setMaximumSize(new java.awt.Dimension(25, 25));
        cmdRemove.setMinimumSize(new java.awt.Dimension(25, 25));
        cmdRemove.setPreferredSize(new java.awt.Dimension(80, 25));
        cmdRemove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdRemoveActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 4;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1);
        pnlCommandPanel.add(cmdRemove, gridBagConstraints);

        cmdAdd.setIcon(IconLoader.getImageIcon("images/plus.png"));
        cmdAdd.setText("Add");
        cmdAdd.setToolTipText("Add a new query");
        cmdAdd.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        cmdAdd.setContentAreaFilled(false);
        cmdAdd.setIconTextGap(4);
        cmdAdd.setMaximumSize(new java.awt.Dimension(25, 25));
        cmdAdd.setMinimumSize(new java.awt.Dimension(25, 25));
        cmdAdd.setPreferredSize(new java.awt.Dimension(63, 25));
        cmdAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdAddActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 3;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1);
        pnlCommandPanel.add(cmdAdd, gridBagConstraints);

        pnlSavedQuery.add(pnlCommandPanel, java.awt.BorderLayout.NORTH);

        add(pnlSavedQuery, java.awt.BorderLayout.CENTER);
    }
244355
private void initialize() {
		this.setLayout(new CardLayout());
		this.setName(getPanelName(getContextIndex()));
		this.add(getPanelSession(), getPanelSession().getName());
	}
1334724
public function init()
    {
        if (isset($this->view)) {
            $controller = $this->getController();
            if (isset($controller) && $controller->getViewFile($this->view) !== false) {
                $this->content = $this->controller->renderPartial($this->view, $this->viewData, true);
            }
        }
        $this->htmlOptions['headingOptions'] = $this->headingOptions;
    }
683787
public function initialize()
    {
        if ($this->all()->count() < 1) {
            return;
        }

        $this->all()->each(function (ActionInterface $action) {
            $action->initialize();
        });

        $this->setHtmlAttribute('data-type', 'display-actions');

        if (! $this->hasHtmlAttribute('class')) {
            $this->setHtmlAttribute('class', 'panel-footer');
        }
    }
168377
public function init()
    {
        parent::init();
        $this->createEmbeddedWidgets();

        $this->check_all->init();

        if ($this->show_check_all && $this->visible) {
            $this->parent->appendRow($this->check_all);
        }
    }
862655
public function init() {
        if (null != $this->url) {
            $this->pluginOptions['url'] = $this->url;
        } else {
            $this->pluginOptions['url'] = Url::to([$this->view->context->id.'/nodeMove']);
        }

		parent::init();
		$this->registerAssets();

        Html::addCssClass($this->options, 'dd');
		echo Html::beginTag('div', $this->options);

        if (null != $this->query) {
            $this->items = $this->prepareItems($this->query);
        }
		if (count($this->items) === 0) {
			echo Html::tag('div', '', ['class' => 'dd-empty']);
		}
	}