public function add(AbstractComponent $component) { if ($component instanceof FieldSet && !$component->isNamespaced()) { $this->components = array_merge($this->components, $component->getComponents()); } parent::add($component); return $this; }
/** * Constructor. * * @param Row[] $rows */ public function __construct(array $rows = array()) { parent::__construct(); foreach ($rows as $name => $row) { $this->add($name, $row); } }
/** * Register component and apply paging settings to Data Provider * * @return void */ public function prepare() { $this->prepareOptions(); $paging = $this->getContext()->getRequestParam('paging'); $this->getContext()->getDataProvider()->setLimit($this->getOffset($paging), $this->getSize($paging)); parent::prepare(); }
public function __construct(\Slipstream\Common\ConfigurationInterface $conf, \Slipstream\Common\DomainObjectManager $domainObjectManager, \Slipstream\Common\Log\Handler $log, \Slipstream\Common\Injector\Injector $injector) { $this->_configuration = $conf; $this->_dom = $domainObjectManager; $this->_injector = $injector; parent::__construct($log); }
/** * @param string $text * @param bool $trans * @param string $domain */ public function __construct($text, $trans = false, $domain = 'datagrid') { parent::__construct(); $this->name = 'label'; $this->text = $text; $this->trans = $trans; $this->domain = $domain; }
/** * Constructor. * * @param string $type * @param Cell[] $cells */ public function __construct($type, array $cells = array()) { parent::__construct(); $this->type = $type; foreach ($cells as $name => $cell) { $this->add($name, $cell); } }
/** * @param array ComponentInterface[] */ public function __construct(array $items = array()) { parent::__construct(); $this->name = 'collection'; foreach ($items as $item) { $this->add($item); } }
/** * @param string|null $url * @param string|null $route * @param array $parameters */ public function __construct($url = null, $route = null, array $parameters = array()) { parent::__construct(); $this->name = 'url'; $this->url = $url; $this->route = $route; $this->parameters = $parameters; }
public function renderElementProgressive($renderApi, $unit) { $output = ''; foreach ($this->children as $child) { $output .= $child->renderElement(); } parent::setContent($output); return parent::renderElementProgressive($renderApi, $unit); }
/** * {@inheritdoc} */ public function __toString() { $value = parent::__toString(); // according to http://tools.ietf.org/html/rfc3986#section-3.5 $rawSymbols = array('/', '?', '-', '.', '_', '~', '!', '$', '&', '\'', '(', ')', '*', '+', ',', ';', '=', ':', '@'); $encodedSymbols = array_map(function ($symbol) { return urlencode($symbol); }, $rawSymbols); return str_replace($encodedSymbols, $rawSymbols, rawurlencode($value)); }
/** * Register component and apply paging settings to Data Provider * * @return void */ public function prepare() { parent::prepare(); $this->prepareConfiguration(); $this->prepareOptions(); $paging = $this->getContext()->getRequestParam('paging'); $this->getContext()->getDataProvider()->setLimit($this->getOffset($paging), $this->getSize($paging)); $jsConfig = $this->getConfiguration($this); $this->getContext()->addComponentDefinition($this->getComponentName(), $jsConfig); }
/** * Constructor. * * @param null|Section $head * @param null|Section $body * @param null|Section $foot * @param string $name * @param null|string $caption */ public function __construct(Section $head = null, Section $body = null, Section $foot = null, $name = 'datagrid', $caption = null) { parent::__construct(); $head = $head ?: new Section(); $body = $body ?: new Section(); $foot = $foot ?: new Section(); $this->children = array('head' => $head->bind($this, 'head'), 'body' => $body->bind($this, 'body'), 'foot' => $foot->bind($this, 'foot')); $this->name = $name; $this->caption = $caption; $this->columns = array(); }
/** * @inheritDoc */ public function prepare() { $config = $this->getConfiguration(); foreach ($this->getChildComponents() as $actionComponent) { $config['actions'][] = $actionComponent->getConfiguration(); } $origConfig = $this->getConfiguration(); if ($origConfig !== $config) { $config = array_replace_recursive($config, $origConfig); } $this->setData('config', $config); parent::prepare(); }
public function add(AbstractComponent $component) { $name = $component->getPropertyName(); $this->components[$name] = $component; return $this; }
/** * @param string $value */ public function __construct($value) { parent::__construct(); $this->name = 'data'; $this->value = $value; }
public function setContent($content) { parent::setContent($content); }
/** * @param string $token * @param string $text */ public function __construct($token, $text) { parent::__construct($token); $this->text = $text; }
/** * Register component. * * @return void */ public function prepare() { parent::prepare(); $jsConfig = $this->getConfiguration($this); $this->getContext()->addComponentDefinition($this->getComponentName(), $jsConfig); }
public function __construct(\Slipstream\Common\DomainObjectManager $dom, \Slipstream\Common\Log\Handler $log) { $this->_dom = $dom; parent::__construct($log); }
/** * {@inheritdoc} */ public function __toString() { $value = parent::__toString(); return rawurlencode($value); }