/**
  * @param string $name
  * @return mixed
  */
 public function getPropertyValue($name)
 {
     if ($this->collectionPropertyConfig instanceof PropertyListConfig && !$this->offsetExists($name)) {
         throw new \RuntimeException("Property [{$name}] is missing.");
     }
     return $this->controller->getPropertyViewValue($this->collectionProperty->getHierarchicalName() . '.' . $name);
 }
 public function filter($content, array $options = array())
 {
     if ($content instanceof HtmlTag) {
         $content->addClass('su-content-inline su-input-map-inline map')->setAttribute('id', sprintf('content_%s_%s', $this->blockProperty->getBlock()->getId(), str_replace('.', '_', $this->blockProperty->getHierarchicalName())));
     }
     return $content;
 }
Пример #3
0
 /**
  * {@inhertitDoc}
  */
 public function isMatchingProperty(BlockProperty $property)
 {
     if ($this->parent instanceof PropertyListConfig) {
         return $property->getHierarchicalName() === $this->parent->getHierarchicalName() . '.' . $property->getName() && $property->getEditableClass() === get_class($this->editable);
     }
     return $property->getHierarchicalName() === $this->getHierarchicalName() && $property->getEditableClass() === get_class($this->editable);
 }
Пример #4
0
 /**
  * @return string
  */
 public function getHierarchicalName()
 {
     if ($this->parent === null) {
         return $this->name;
     }
     return $this->parent->getHierarchicalName() . '.' . $this->name;
 }
 /**
  * @param string $content
  * @param array $options
  * @return string
  */
 public function filter($content, array $options = array())
 {
     $wrap = '<span id="content_%s_%s" class="su-content-inline su-input-image-inline">%s</span>';
     return sprintf($wrap, $this->blockProperty->getBlock()->getId(), str_replace('.', '_', $this->blockProperty->getHierarchicalName()), $content);
 }
Пример #6
0
 /**
  * @param string $content
  * @param array $options
  * @return string
  */
 public function filter($content, array $options = array())
 {
     $itemTemplate = !empty($options['itemTemplate']) ? $options['itemTemplate'] : null;
     $wrapperTemplate = !empty($options['wrapperTemplate']) ? $options['wrapperTemplate'] : null;
     return sprintf('<div id="content_%s_%s" class="su-content-inline su-input-gallery-inline" data-item-template="%s" data-wrapper-template="%s">%s</div>', $this->blockProperty->getBlock()->getId(), str_replace('.', '_', $this->blockProperty->getHierarchicalName()), htmlspecialchars($itemTemplate), htmlspecialchars($wrapperTemplate), $content);
 }
 /**
  * @param string $content
  * @param array $options
  * @return string
  */
 public function filter($content, array $options = array())
 {
     return sprintf('<div id="content_%s_%s" class="su-content-inline su-input-media-inline-content">%s</div>', $this->blockProperty->getBlock()->getId(), str_replace('.', '_', $this->blockProperty->getHierarchicalName()), $content);
 }
Пример #8
0
 /**
  * {@inheritDoc}
  */
 public function isMatchingProperty(BlockProperty $property)
 {
     return $property->getHierarchicalName() == $this->name;
 }
 /**
  * @param string $content
  * @param array $options
  * @return string
  */
 public function filter($content, array $options = array())
 {
     $wrap = '<div id="content_%s_%s" class="su-content-inline su-input-string-inline">%s</div>';
     return sprintf($wrap, $this->blockProperty->getBlock()->getId(), str_replace('.', '_', $this->blockProperty->getHierarchicalName()), htmlspecialchars($content, ENT_QUOTES, 'UTF-8'));
 }