Set children.

@param View[] $children

@return View
17983
public function setChildren($children)
    {
        $this->children = $children;
        if ($children !== null) {
            foreach ($children as $child) {
                $child->setParent($this);
            }
        }

        return $this;
    }
473078
public function addChild(\Amulen\ClassificationBundle\Entity\Category $children)
    {
        $this->children[] = $children;

        return $this;
    }
656795
public void setChildren(java.util.Collection<Child> children) {
        if (children == null) {
            this.children = null;
            return;
        }

        this.children = new java.util.ArrayList<Child>(children);
    }
687388
public function setTreeView($get_children_callback, $tree_view_has_children_column = 'has_children')
	{
		if (!is_callable($get_children_callback)) {
			throw new DataGridException(
				'Parameters to method DataGrid::setTreeView must be of type callable'
			);
		}

		if (is_callable($tree_view_has_children_column)) {
			$this->tree_view_has_children_callback = $tree_view_has_children_column;
			$tree_view_has_children_column = null;
		}

		$this->tree_view_children_callback = $get_children_callback;
		$this->tree_view_has_children_column = $tree_view_has_children_column;

		/**
		 * TUrn off pagination
		 */
		$this->setPagination(false);

		/**
		 * Set tree view template file
		 */
		if (!$this->template_file) {
			$this->setTemplateFile(__DIR__ . '/templates/datagrid_tree.latte');
		}

		return $this;
	}
1333515
protected function renderChildren(array $children = [], $force)
    {
        // The HTML result of children
        $html = '';

        // Iterate children and render HTML of each
        foreach ($children as $child) {
            $html .= $child->render($force)->get();
        }

        return $html;
    }
801644
public function setItems($items)
    {
        $this->items = ($items instanceof Collection) ? $items : Collection::make($items);

        return $this;
    }
652779
public function setItems(array $items)
    {
        $this->items = $items;
        $this->names = array_keys($items);

        return $this;
    }
818924
public function setRows(array $rows)
    {
        $this->rows = $rows;
        $this->setKeys(array_keys($this->rows[0]));
        return $this;
    }
1366525
public function removeAll(array $items) : Set
    {
        $values = $this->_removeSameAll($items);
        $this->setValues($values);
        return $this;
    }
280248
public function setChildren (array $components = [])
  {
    self::removeAll ($components);
    $this->children = $components;
    $this->attach ($components);
  }
85952
public function setRoles($roles)
    {
        if (!is_array($roles)) {
            $roles = [$roles];
        }

        $this->roles = $roles;

        return $this;
    }
681607
protected function renderChildren(ElementCollection $children)
    {
        $attributes = [];

        $children->forAll(function (ElementInterface $child) use (&$attributes) {
            $attributes[] = $this->renderElement($child);
        });

        return $attributes;
    }
27762
public function recursiveTidy($children)
    {

        foreach ($children as $page) {
            $write = false;

            // This is so something (events for example) can be purged.

            if ($this->purge && is_a($page, $this->purge, true)) {
                $page->delete();
                $this->purged++;
                continue;
            }

            // The most common issue is that the site ID doesn't match.

            if ($page->SiteID != $this->siteID) {

                // Update it to match.

                $page->SiteID = $this->siteID;
                $write        = true;
            }

            // The next issue is that duplicated URL segments have numbers appended (`URL-segment-2` for example).

            if (preg_match('%-[0-9]$%', $page->URLSegment)) {

                // When a page title ends with a number, the URL should match this.

                $last = substr($page->Title, -1);
                if (is_numeric($last)) {

                    // Determine whether this actually needs fixing.

                    if ($last !== substr($page->URLSegment, -1)) {

                        // Update it to match.

                        $page->URLSegment = $page->Title;
                        $write            = true;
                    }
                }

                // The number appended shouldn't exist.
                else {

                    // Determine whether this is considered unique (otherwise it can't be updated).

                    $to = substr($page->URLSegment, 0, -2);
                    if (!SiteTree::get()->filter(array(
                            'ParentID' => $page->ParentID,
                            'URLSegment' => $to
                        ))->exists()) {

                        // This isn't unique, so update it.

                        $page->URLSegment = $to;
                        $write            = true;
                    }
                }
            }

            // Determine whether this page needs a write.

            if ($write) {
                $page->write();
                $this->count++;
            }

            // Where necessary, continue further down.

            $this->recursiveTidy($page->AllChildren());
        }
    }
1203343
public function addChild(\Fulgurio\LightCMSBundle\Entity\Page $children)
    {
        $this->children[] = $children;

        return $this;
    }
578988
def set_children(self, child_ids):
        """"""
        if not self._supports_simple_sequencing():
            raise errors.IllegalState()
        self._my_map['childIds'] = [str(i) for i in child_ids]
744740
private function outputChildren($children, $depth)
    {
        if ($children) {
            foreach ($children as $childNode) {
                if ($childNode->getInfo() === 'Prototype') {
                    $childNode->setInfo('');
                    $hasChildren = !$childNode instanceof ArrayNode || !$childNode->getChildren();
                    $this->writeNode($childNode, $depth + 1, $hasChildren);
                } else {
                    $this->writeNode($childNode, $depth + 1);
                }
            }
        }

        if ($children || $this->example || $this->defaultArray) {
            $this->writeLine('],', $depth * 4);
        }
    }
929906
private function _appendChildren(array &$children, $name, array $_children)
  {
    foreach ($_children as $key => $value) {
      $children[$name . "/" . $key] = $value;
    }
  }