Create children depending on choice type.

@return void
505448
protected function createChildren()
    {
        if (($data_override = $this->getOption('data_override')) && $data_override instanceof \Closure) {
            $this->options['choices'] = $data_override($this->options['choices'], $this);
        }
        
        $this->children = [];
        $this->determineChoiceField();

        $fieldType = $this->formHelper->getFieldType($this->choiceType);

        switch ($this->choiceType) {
            case 'radio':
            case 'checkbox':
                $this->buildCheckableChildren($fieldType);
                break;
            default:
                $this->buildSelect($fieldType);
                break;
        }
    }
594414
public function addChildren($child) : void
    {
        Assert::isInstanceOfAny($child, [EntityDescriptor::class, EntitiesDescriptor::class]);
        $this->children[] = $child;
    }
368640
public function children()
    {
        if (!$this->nodes) {
            throw new \InvalidArgumentException('The current node list is empty.');
        }

        $node = $this->getNode(0)->firstChild;

        return $this->createSubCrawler($node ? $this->sibling($node) : array());
    }
538196
public function init() {
		
		parent::init();

		$classes = array('nav');

		$validTypes = array(self::TYPE_TABS, self::TYPE_PILLS, self::TYPE_LIST, self::TYPE_NAVBAR);

		if (isset($this->type) && in_array($this->type, $validTypes)) {
			$classes[] = $this->type === self::TYPE_NAVBAR ? 'navbar-nav' : 'nav-' . $this->type;
		}

		if ($this->stacked && $this->type !== self::TYPE_LIST) {
			$classes[] = 'nav-stacked';
		}
		
		if ($this->justified && $this->type !== self::TYPE_LIST) {
			$classes[] = 'nav-justified';
		}

		if ($this->dropup === true) {
			$classes[] = 'dropup';
		}

		if (isset($this->scrollspy)) {
			$scrollspy = is_string($this->scrollspy) ? array('target' => $this->scrollspy) : $this->scrollspy;
			$this->widget('booster.widgets.TbScrollSpy', $scrollspy);
		}

		if (!empty($classes)) {
			$classes = implode(' ', $classes);
			if (isset($this->htmlOptions['class'])) {
				$this->htmlOptions['class'] .= ' ' . $classes;
			} else {
				$this->htmlOptions['class'] = $classes;
			}
		}
	}
214460
public function init()
    {
        parent::init();
        $this->clientOptions = false;
        Html::addCssClass($this->options, ['widget' => 'btn']);

        switch ($this->type) {
            case self::TYPE_FLOATING:
            case self::TYPE_FLAT:
                Html::addCssClass($this->options, ['btn_type' => "btn-$this->type"]);
                break;
        }

        switch ($this->size) {
            case self::SIZE_SMALL:
            case self::SIZE_LARGE:
                Html::addCssClass($this->options, ['btn_size' => "btn-$this->size"]);
                break;
        }

//        if ($this->large) {
//            Html::addCssClass($this->options, ['btn_size' => 'btn-large']);
//        }

        if ($this->disabled) {
            Html::addCssClass($this->options, ['btn_disabled' => 'disabled']);
        }
    }
1307253
private function createElement($type, $children = array(), array $attributes = array(), $text = null)
    {
        $element = new NodeElement();
        $element->openTag($type);

        if (!empty($attributes)) {
            $element->addAttributes($attributes);
        }

        if (!empty($children)) {
            if ($children instanceof NodeElement) {
                $children = array($children);
            }

            $element->appendChildren($children);
        }

        if ($text !== null) {
            $element->setText($text);
        }

        $element->closeTag();

        return $element;
    }
441404
public function init()
    {
        if ($this->submenuOptions === null) {
            $this->submenuOptions = $this->options;
            unset($this->submenuOptions['id']);
        }
        parent::init();

        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getUniqueId('dropdown_');
        }
        Html::addCssClass($this->options, ['widget' => 'dropdown-content']);

        $this->registerPlugin('Dropdown', '.dropdown-trigger');
    }
124316
protected function children()
    {
        if (($item = $this->getModel()) && method_exists($item, $this->name)) {
            return $item->{$this->name};
        }
    }
737322
public function initTypes()
    {
        $names = $this->generateTypesNames();
        foreach ($names as $name) {
            $object = $this->getNewType($name);
            $this->addType($object);
        }
    }
982219
private function fill_defaults()
	{
		if ( ! array_key_exists('ID', $this->attributes) ) {

			$this->attributes['post_type'] = $this->type;

			$this->attributes['post_status'] = $this->status;

		}
	}
107832
public function create()
	{
		// Element fields, so don´t use parent construct method
		$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',invisible';
		$GLOBALS['TL_DCA']['tl_content']['fields']['invisible']['eval']['tl_class'] = 'clr'; // push to new row (clear)
	
		// The start field
		if ($this->canChangeStart)
		{
			$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',start';
		}
		// The stop field
		if ($this->canChangeStop)
		{
			$GLOBALS['TL_DCA']['tl_content']['palettes'][$this->element] .= ',stop';
		}		
	}
520536
public function init()
    {
        parent::init();

        $classes = array('table');

        if (isset($this->type) && !empty($this->type)) {
            if (is_string($this->type)) {
                $this->type = explode(' ', $this->type);
            }

            $validTypes = array(
                TbHtml::GRID_TYPE_BORDERED,
                TbHtml::GRID_TYPE_CONDENSED,
                TbHtml::GRID_TYPE_STRIPED,
                TbHtml::GRID_TYPE_HOVER
            );

            foreach ($this->type as $type) {
                if (in_array($type, $validTypes)) {
                    $classes[] = 'table-' . $type;
                }
            }
        }

        TbHtml::addCssClass(implode(' ', $classes), $this->htmlOptions);
    }
1262955
public function setup(){
		if(($this->hasOption('autoinit') && $this->options()->autoinit) && ($this->hasOption('class') || $this->hasOption('default'))){
			$strClass = $this->hasOption('class') ? $this->options()->class : $this->options()->default;
			$this->setValue(new $strClass);
		}
	}
513302
def add_child(self, *sprites):
        """"""
        for sprite in sprites:
            self._add(sprite)
        self._sort()
        self.redraw()
1099582
protected function on_created()
    {
        foreach( $this->model['components'] as $args )
        {
            $this->components[$args['name']] = $this->create_component($args);
        }
    }
408012
def new_children(self, **kwargs):
        """"""
        for k, v in kwargs.items():
            self.new_child(k, v)

        return self
944250
private function maybeLoadChoices(): bool
    {
        if (! $this->isLoaded()) {
            $callback = $this->callback;
            $this->choices = $callback();
            $this->isLoaded = true;

            return true;
        }

        return false;
    }