Example #1
0
 /**
  * Create instance of BEM block.
  *
  * @param string              $name         Block name.
  * @param array|NodeElement[] $nodes        Nodes associated with this block.
  * @param IPageFactory        $page_factory Page factory.
  * @param BEMElementLocator   $locator      Locator.
  */
 public final function __construct($name, array $nodes, IPageFactory $page_factory, BEMElementLocator $locator)
 {
     parent::__construct($name);
     $this->_nodes = $nodes;
     $this->_locator = $locator;
     $page_factory->initElements($this, $page_factory->createDecorator($this));
 }
Example #2
0
 /**
  * Specifies wrapped WebElement and element's name.
  *
  * @param string     $name            Element name.
  * @param WebElement $wrapped_element Wrapped element.
  */
 public function __construct($name, WebElement $wrapped_element)
 {
     parent::__construct($name);
     $this->_wrappedElement = $wrapped_element;
 }