{{{ public function buildDemoUI();
430698
public function buildDemoUI(SwatUI $ui)
	{
		$message = new SwatMessage(
			'These actions are for demonstration purposes only.');

		$message->secondary_content =
			'The actions do not do anything as this page is not connected '.
			'to a database.';

		$ui->getWidget('note')->add($message, SwatMessageDisplay::DISMISS_OFF);

		$data = array(
			array('Apple', false, true),
			array('Orange', false, false),
			array('Strawberry', true, false),
		);

		$table_view = $ui->getWidget('table_view');
		$table_store = new SwatTableStore();

		foreach ($data as $datum) {
			$fruit = new FruitObject();
			$fruit->title = $datum[0];
			$fruit->makes_jam = $datum[1];
			$fruit->makes_pie = $datum[2];

			$table_store->addRow($fruit);
		}

		$table_view->model = $table_store;
	}
728425
public function build()
    {
        $this->builder->generatedValue($this->strategy);

        if ($this->name) {
            $this->builder->setSequenceGenerator($this->name, $this->size, $this->initial);
        }

        if ($this->generator) {
            $this->classMetadata->setCustomGeneratorDefinition(['class' => $this->generator]);
        }
    }
1026471
public function dashboard() {
    $build = [];
    $build['content'] = [
      '#type' => 'container',
      '#attributes' => ['class' => ['dashboard-wrapper']],
    ];

    $entity_storage = $this->entityTypeManager()
      ->getStorage('openy_upgrade_log');
    $resolved_count = $entity_storage->getQuery()
      ->condition('status', TRUE)
      ->count()
      ->execute();
    $conflicts_count = $entity_storage->getQuery()
      ->condition('status', TRUE, '!=')
      ->count()
      ->execute();

    $total = $resolved_count + $conflicts_count;
    if ($total === 0) {
      $build['content']['message']['#markup'] = $this->t('Congratulation! You have no conflicts detected.');
    }

    $build['content']['conflict_wrapper'] = [
      '#type' => 'details',
      '#title' => $this->t('Conflicts (@count)', [
        '@count' => $conflicts_count,
      ]),
      '#description' => $this->t('Here you can see list of configs that were changed manually and differ from Open Y. In DIFF modal you can approve this changes or restore Open Y version. <br> Also you can resolve conflict and apply both changes(manual and Open Y).'),
      '#open' => TRUE,
      '#attributes' => ['class' => ['conflicts-wrapper']],
    ];
    $build['content']['conflict_wrapper']['view'] = [
      '#type' => 'view',
      '#name' => 'openy_upgrade_dashboard',
      '#display_id' => 'conflicts',
    ];

    if ($resolved_count >= 1) {
      // Show resolved section only if items exist.
      $build['content']['resolved_wrapper'] = [
        '#type' => 'details',
        '#title' => $this->t('Resolved conflicts (@count)', [
          '@count' => $resolved_count,
        ]),
        '#description' => $this->t('Here you can see list of configs that differ from Open Y, but was approved as resolved.'),
        '#attributes' => ['class' => ['resolved-wrapper']],
      ];
      $build['content']['resolved_wrapper']['view'] = [
        '#type' => 'view',
        '#name' => 'openy_upgrade_dashboard',
        '#display_id' => 'resolved',
      ];
    }

    $build['#attached']['library'][] = 'openy_upgrade_tool/dashboard';

    return $build;
  }
927593
protected function buildMap(): void
    {
        $roots = $this->findRootPages();

        $this->buildPageMap($roots['main'], $roots['source'], $this->sourceMap, $this->sourceMapInverse);
        $this->buildPageMap($roots['main'], $roots['target'], $this->targetMap, $this->targetMapInverse);
        $this->combineSourceAndTargetMaps();
    }
577654
public function buildDemoUI(SwatUI $ui)
	{
		$flydown = $ui->getWidget('flydown');

		$flydown->addOption(
			new SwatOption('mackintosh', 'McIntosh'),
			array('classes' => 'apple'));

		$flydown->addOption(
			new SwatOption('courtland', 'Courtland'),
			array('classes' => 'apple'));

		$flydown->addOption(
			new SwatOption('golden', 'Golden Delicious'),
			array('classes' => 'apple'));

		$flydown->addOption(
			new SwatOption('fuji', 'Fuji'),
			array('classes' => 'apple'));

		$flydown->addOption(
			new SwatOption('smith', 'Granny Smith'),
			array('classes' => 'apple'));

		$flydown->addOption(
			new SwatOption('navel', 'Navel'),
			array('classes' => 'orange'));

		$flydown->addOption(
			new SwatOption('blood', 'Blood'),
			array('classes' => 'orange'));

		$flydown->addOption(
			new SwatOption('florida', 'Florida'),
			array('classes' => 'orange'));

		$flydown->addOption(
			new SwatOption('california', 'California'),
			array('classes' => 'orange'));

		$flydown->addOption(
			new SwatOption('mandarin', 'Mandarin'),
			array('classes' => 'orange'));

		// tree flydown
		$tree = new SwatTreeFlydownNode(null, 'Root');

		$apples = new SwatTreeFlydownNode('apple', 'Apple');
		$apples->addChild(new SwatTreeFlydownNode('mackintosh', 'McIntosh'));
		$apples->addChild(new SwatTreeFlydownNode('courtland', 'Courtland'));
		$apples->addChild(new SwatTreeFlydownNode('golden', 'Golden Delicious'));
		$apples->addChild(new SwatTreeFlydownNode('fuji', 'Fuji'));
		$apples->addChild(new SwatTreeFlydownNode('smith', 'Granny Smith'));

		$oranges = new SwatTreeFlydownNode('orange', 'Orange');
		$oranges->addChild(new SwatTreeFlydownNode('navel', 'Navel'));
		$oranges->addChild(new SwatTreeFlydownNode('blood', 'Blood'));
		$oranges->addChild(new SwatTreeFlydownNode('florida', 'Florida'));
		$oranges->addChild(new SwatTreeFlydownNode('california', 'California'));
		$oranges->addChild(new SwatTreeFlydownNode('mandarin', 'Mandarin'));

		$tree->addChild($apples);
		$tree->addChild($oranges);

		$tree_flydown = $ui->getWidget('tree_flydown');
		$tree_flydown->setTree($tree);

		// grouped flydown
		$grouped_tree = new SwatTreeFlydownNode(null, 'Root');

		$apples = new SwatTreeFlydownNode(null, 'Apple');
		$apples->addChild(new SwatTreeFlydownNode('mackintosh', 'McIntosh'));
		$apples->addChild(new SwatTreeFlydownNode('courtland', 'Courtland'));
		$apples->addChild(new SwatTreeFlydownNode('golden', 'Golden Delicious'));
		$apples->addChild(new SwatTreeFlydownNode('fuji', 'Fuji'));
		$apples->addChild(new SwatTreeFlydownNode('smith', 'Granny Smith'));

		$oranges = new SwatTreeFlydownNode(null, 'Orange');
		$oranges->addChild(new SwatTreeFlydownNode('navel', 'Navel'));
		$oranges->addChild(new SwatTreeFlydownNode('blood', 'Blood'));
		$oranges->addChild(new SwatTreeFlydownNode('florida', 'Florida'));
		$oranges->addChild(new SwatTreeFlydownNode('california', 'California'));
		$oranges->addChild(new SwatTreeFlydownNode('mandarin', 'Mandarin'));
		$grouped_flydown = $ui->getWidget('grouped_flydown');
		$grouped_flydown->setTree($grouped_tree);

		$grouped_tree->addChild($apples);
		$grouped_tree->addChild($oranges);

		// cascading flydown
		$cascade_from = $ui->getWidget('cascade_from');
		$cascade_from->options = array(
			new SwatOption(0, 'Apple'),
			new SwatOption(1, 'Orange')
		);

		$cascade_to = $ui->getWidget('cascade_to');
		$cascade_to->cascade_from = $cascade_from;

		$cascade_to->options = array(
			0 => array(
				new SwatOption(0, 'McIntosh'),
				new SwatOption(1, 'Courtland'),
				new SwatOption(2, 'Golden Delicious'),
				new SwatOption(3, 'Fuji'),
				new SwatOption(4, 'Granny Smith')
			),
			1 => array(
				new SwatOption(0, 'Navel'),
				new SwatOption(1, 'Blood'),
				new SwatOption(2, 'Florida'),
				new SwatOption(3, 'California'),
				new SwatOption(4, 'Mandarin')
			)
		);
	}
222422
private function build() {
        $this->getObject()->addUse('Bullhorn\FastRest\Api\Models\ApiInterface as ModelInterface');
        $this->getObject()->setName(ucfirst(strtolower($this->getClassName())) . 'Controller');
        $this->getObject()->setNamespace($this->getConfiguration()->getRootNamespace() . '\Controllers');
        $this->getObject()->setExtends('ControllerBase');
        $this->buildFactory();
        $this->buildIndexAction();
        $this->buildShowAction();
        $this->buildCreateAction();
        $this->buildUpdateAction();
        $this->buildDeleteAction();
        $this->buildDocumentation();
    }
667929
public function _construct()
    {
        $this->_init(
            \Dotdigitalgroup\Email\Model\Catalog::class,
            \Dotdigitalgroup\Email\Model\ResourceModel\Catalog::class
        );
    }
299862
public function _construct()
    {
        $this->_controller = 'adminhtml_dashboard';
        $this->_headerText = __('Dashboard');
        parent::_construct();

        /**
         * Contact sync.
         */
        $this->buttonList->add(
            'contact_sync',
            [
                'label' => __('Run Contact Sync'),
                'class' => 'primary'
            ]
        );

        /**
         * Importer sync.
         */
        $this->buttonList->add(
            'importer_sync',
            [
                'label' => __('Run Importer Sync'),
                'class' => 'primary'
            ]
        );
    }
469652
public function build()
    {
        foreach ($this->getJoinColumns() as $column) {
            $this->getAssociation()->addJoinColumn(
                $column->getJoinColumn(),
                $column->getReferenceColumn(),
                $column->isNullable(),
                $column->isUnique(),
                $column->getOnDelete(),
                $column->getColumnDefinition()
            );
        }

        parent::build();
    }
1361144
public function Build() {
        $left_menu_output = "<ul class=\"content_left nav-sidebar\">";
        $main_menus = $this->_LoadXml();
        $left_menu_output .= $this->ProcessMainMenus($main_menus);
        $left_menu_output .= "</ul>";
        return $left_menu_output;
    }
724102
public function _construct()
    {
        $this->_init(
            \Dotdigitalgroup\Email\Model\Wishlist::class,
            \Dotdigitalgroup\Email\Model\ResourceModel\Wishlist::class
        );
    }
20479
public function build()
    {
        parent::build();

        $options = $this->suppliedOptions;

        $dataOptions        = $options['options'];
        $options['options'] = array();

        //iterate over the options to create the options assoc array
        foreach ($dataOptions as $val => $text) {
            $options['options'][] = array(
                'id'   => is_numeric($val) ? $text : $val,
                'text' => $text,
            );
        }

        $this->suppliedOptions = $options;
    }
1319797
public function _construct()
    {
        $this->_init(
            \Dotdigitalgroup\Email\Model\FailedAuth::class,
            \Dotdigitalgroup\Email\Model\ResourceModel\FailedAuth::class
        );
    }
492505
public function build()
    {
        $this->app->writeln("\n<comment>Adding root pages</comment>");
        $this->addPages('\\Skosh\\Content\\Page');

        $this->app->writeln("\n<comment>Adding posts</comment>");
        $this->addPages('\\Skosh\\Content\\Post', 'path', '_posts');

        $this->app->writeln("\n<comment>Adding docs</comment>");
        $this->addPages('\\Skosh\\Content\\Doc', 'path', '_doc');

        // Sort pages
        $this->sortPosts();

        // Fire event
        Event::fire('pages.sorted', [$this]);

        $this->app->writeln("\n<comment>Rendering content</comment>");

        foreach ($this->site->pages as $content) {
            $this->renderContent($content);
        }

        // Fire event
        Event::fire('pages.rendered', [$this]);
    }
556239
private function buildModelMap()
    {
        $this->modelMap = ArrayHelper::merge($this->defaultModelMap, $this->modelMap);
        foreach ($this->modelMap as $modelName => $configuration) {
            Yii::$container->set($configuration['class'], $configuration);
        }
    }
592520
protected function build()
    {
        foreach ($this->keys as $tag => $code) {
            $this->tags["<{$tag}>"]    = $code;
            $this->tags["</{$tag}>"]   = $code;
            $this->tags["<\\/{$tag}>"] = $code;
        }
    }
34269
public function _construct()
    {
        $this->_init(
            \Dotdigitalgroup\Email\Model\Review::class,
            \Dotdigitalgroup\Email\Model\ResourceModel\Review::class
        );
    }