Dodaje element potomny
@param \Mmi\Navigation\NavigationConfigElement $element
@return \Mmi\Navigation\NavigationConfigElement
18790
public function addChild(\Mmi\Navigation\NavigationConfigElement $element)
    {
        $this->_options['children'][$element->getId()] = $element;
        return $this;
    }
1338534
public function prependChild(Element $element)
	{
		$this->beforeInsert($element);
		
		array_unshift($this->children, $element);
		
		$this->afterInsert();
		
		return $this;
	}
1152155
private function createElement($element)
    {
        if ($element instanceof FilterElementInformationInterface) {
            $panelElement = new DefaultFilterElement();
            return $panelElement->setPropertyName($element->getPropertyName());
        }
        if ($element instanceof LimitElementInformationInterface) {
            return new DefaultLimitElement();
        }
        if ($element instanceof SearchElementInformationInterface) {
            return $this->buildSearchElement($element);
        }
        if ($element instanceof SortElementInformationInterface) {
            return new DefaultSortElement();
        }
        if ($element instanceof SubmitElementInformationInterface) {
            return new DefaultSubmitElement();
        }

        return null;
    }
35942
protected function elementHasSafeUrl(DOMElement $element)
	{
		return $element->firstChild instanceof DOMText && $this->isSafeUrl($element->firstChild->textContent);
	}
109769
public function addElement($element, $name = null) {
		if ($name === null) {
			$this->_elements[] = $element;
		} else {
			$this->_elements[$name] = $element;
		}
		
		return $this;
	}
409300
protected function getBlock(\DOMElement $element) {
    $block = '';
    /** @var \DOMNode $node */
    foreach ($element->childNodes as $node) {
      switch ($node->nodeType) {

        case XML_ELEMENT_NODE:
          /** @var \DOMElement $node */
          switch ($node->nodeName) {

            // Explicitly handle these elements.

            case 'i':
            case 'em':
              $block .= '*' . $this->getBlock($node) . '*';
              break;

            case 'b':
            case 'strong':
              $block .= '**' . $this->getBlock($node) . '**';
              break;

            case 'a':
              if ($node->hasAttribute('href')) {
                $block .= '[' . $this->getBlock($node) . ']' .
                  '(' . $node->getAttribute('href') . ')';
              }
              break;

            // Other inline elements.
            default:
              // Recursively handle any descendant elements we care about.
              $block .= $this->getBlock($node);
              break;

          }
          break;

        case XML_TEXT_NODE:
          /** @var \DOMText $node */
          $block .= self::escape($node->textContent);
          break;

      }
    }

    // Handle white-listed elements.
    if (in_array($element->nodeName, $this->white_list)) {
      $tag = $element->cloneNode();
      if (!empty($block)) {
        $tag->appendChild(new \DOMText($block));
      }
      $block = $this->dom->saveXML($tag);
    }

    return $block;
  }
874652
public function setDraggable($element,$parameters=[]){
		$attr="id";
		extract($parameters);
		$script=$this->_add_event($element, Javascript::draggable($attr), "dragstart",$parameters);
		return $script;
	}
160185
public function attach(Element\NamedElement $element)
    {
        if (!$this->getByName($element->getName(), false)) {
            $this->attach($element);
        } else {
            throw new Exception\AttachException();
        }

        return $this;
    }
865498
protected function assembleComponent($element)
    {
        $options   = $this->getOptions();
        $element   = parent::__invoke($element);
        $component = sprintf(
            '<div style="padding: 0;" class="input-append color %s" data-color="%s" data-color-format="%s">%s',
            $options['class'],
            $options['color'],
            $options['format'],
            $element
        ) . sprintf(
            '<span class="add-on"><i style="background-color: %s;"></i></span></div>',
            $options['color']
        );

        return $component;
    }
733669
function add($element)
    {
        if(get_class($element) !== $this->manager->getModel()){
            throw new InvalidArgumentException("This element is not compatible with this collection, it only support  ".$this->manager->getModel());
        }
        return array_push($this->elements,$this->manager->hydrate($element));
    }
457008
protected function processChild(\DOMElement $element, ContextInterface $context)
    {
        if ($element->hasAttribute('itemscope') && empty($element->getAttribute('itemprop'))) {
            $context = $this->createAndAddChild($element, $context);
        }

        return $context;
    }
569735
public function formElement(IElement $element)
    {
        if ($element instanceof Textarea) {
            return $this->formTextarea($element);
        } elseif ($element instanceof Select) {
            return $this->formSelect($element);
        } elseif ($element instanceof Submit) {
            return $this->formInput($element);
        } elseif ($element instanceof Button) {
            // todo: is it right?
            throw new InvalidArgumentException("Button element should be rendered without Helper.");
        } else {
            return $this->formInput($element);
        }
    }
809679
public function contextClick(WebDriverElement $element = null)
    {
        $this->action->addAction(
            new WebDriverContextClickAction($this->mouse, $element)
        );

        return $this;
    }
565964
public function add(Component $element)
    {
        $this->elements[] = $element;
        $this->indentations[] = $this->currentIndentation;

        if ($element instanceof LabeledParagraph) {
            $this->alignment->add($element, $this->currentIndentation);
            $element->setAlignment($this->alignment);
        }

        return $this;
    }
968172
public function add($key, $element): self
    {
        $callback = $this->callback;

        $this->index[$callback($element)] = $key;

        return $this;
    }
42308
public function setListElement(string $element): Breadcrumbs
    {
        $this->validateElement('allowedListElement', $element);

        $this->setOption('listElement', $element);

        return $this;
    }
1183490
public function remove($element) {
		$index = array_search($element, $this->collection, true);
		if ($index !== null) {
			unset($this->collection[$index]);
		}

		return $this;
	}