Esempio n. 1
0
 /**
  * @param \Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $attrSetColFac
  * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $prodAttrColFac
  * @param array $params
  * @param \Magento\ImportExport\Model\ImportFactory $importFactory
  * @param \Magento\Catalog\Model\Resource\Product\LinkFactory $productLinkFactory
  * @param \Magento\Framework\App\Resource $resource
  */
 public function __construct(\Magento\Eav\Model\Resource\Entity\Attribute\Set\CollectionFactory $attrSetColFac, \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $prodAttrColFac, array $params, \Magento\ImportExport\Model\ImportFactory $importFactory, \Magento\Catalog\Model\Resource\Product\LinkFactory $productLinkFactory, \Magento\Framework\App\Resource $resource)
 {
     $this->_importFactory = $importFactory;
     $this->_resource = $resource;
     $this->_productLinkFactory = $productLinkFactory;
     parent::__construct($attrSetColFac, $prodAttrColFac, $params);
 }
Esempio n. 2
0
 /**
  * @param PropertyAccessorInterface $propertyAccessor
  * @param ServiceRegistryInterface  $resourceRegistry
  * @param ColumnRendererInterface   $renderer
  */
 public function __construct(PropertyAccessorInterface $propertyAccessor, ServiceRegistryInterface $resourceRegistry, ColumnRendererInterface $renderer)
 {
     parent::__construct($propertyAccessor);
     $this->resourceRegistry = $resourceRegistry;
     $this->propertyAccessor = $propertyAccessor;
     $this->renderer = $renderer;
 }
Esempio n. 3
0
 public function __construct($name, $label, $options = null)
 {
     parent::__construct($name, $label, $options);
     $this->setView('administr/form::submit');
     $this->options['type'] = 'submit';
     $this->setValue($label);
 }
 public function __construct()
 {
     parent::__construct();
     $this->headers = array();
     $this->rows = array();
     $this->columnMaxWidth = array();
     $this->title = '';
 }
Esempio n. 5
0
 /**
  * @param PropertyAccessorInterface $propertyAccessor
  * @param FormatterInterface        $formatter
  * @param int                       $scale
  * @param int                       $rounding
  * @param bool                      $grouping
  */
 public function __construct(PropertyAccessorInterface $propertyAccessor, FormatterInterface $formatter, $scale = 2, $rounding = \NumberFormatter::ROUND_HALFUP, $grouping = false)
 {
     parent::__construct($propertyAccessor);
     $this->formatter = $formatter;
     $this->scale = $scale;
     $this->grouping = $grouping;
     $this->rounding = $rounding;
 }
Esempio n. 6
0
 /**
  * @param array $data accepts min, max
  */
 public function __construct($data)
 {
     if (isset($data['min'])) {
         $this->min = $data['min'];
     }
     if (isset($data['max'])) {
         $this->max = $data['max'];
     }
     parent::__construct($data);
 }
Esempio n. 7
0
 /**
  * @param PropertyAccessorInterface               $propertyAccessor
  * @param FormatterInterface                      $formatter
  * @param int                                     $dateFormat
  * @param int                                     $timeFormat
  * @param \IntlTimeZone|\DateTimeZone|string|null $timezone
  * @param \IntlCalendar|int|null                  $calendar
  * @param string|null                             $pattern
  * @param bool                                    $lenient
  */
 public function __construct(PropertyAccessorInterface $propertyAccessor, FormatterInterface $formatter, $dateFormat = \IntlDateFormatter::MEDIUM, $timeFormat = \IntlDateFormatter::MEDIUM, $timezone = null, $calendar = null, $pattern = null, $lenient = false)
 {
     parent::__construct($propertyAccessor);
     $this->formatter = $formatter;
     $this->dateFormat = $dateFormat;
     $this->timeFormat = $timeFormat;
     $this->timezone = $timezone;
     $this->calendar = $calendar;
     $this->pattern = $pattern;
     $this->lenient = $lenient;
 }
Esempio n. 8
0
 /**
  * Constructor.
  *
  * @param string $name
  * @param array $types
  * @param callable|null $typeResolver
  * @param string|null $description
  */
 public function __construct($name, array $types = [], callable $typeResolver = NULL, $description = NULL)
 {
     parent::__construct($name, $description);
     $nonObjectTypes = array_filter($types, function (TypeInterface $type) {
         return !$type instanceof ObjectType;
     });
     if (!empty($nonObjectTypes)) {
         $nonObjectTypes = implode(', ', array_map(function ($type) {
             return (string) $type;
         }, $nonObjectTypes));
         throw new \LogicException(sprintf('Union %s may only contain object types, it cannot contain: %s.', (string) $this, $nonObjectTypes));
     }
     $this->types = $types;
     $this->typeResolver = $typeResolver;
 }
Esempio n. 9
0
 public function __construct($name, $label, $options = null)
 {
     parent::__construct($name, $label, $options);
     $this->setView('administr/form::text');
     $this->options['type'] = 'password';
 }
Esempio n. 10
0
 /**
  * JsonType constructor.
  *
  * @param PropertyAccessorInterface $propertyAccessor
  * @param int                       $options
  * @param int                       $depth
  */
 public function __construct(PropertyAccessorInterface $propertyAccessor, $options = 0, $depth = 512)
 {
     parent::__construct($propertyAccessor);
     $this->options = $options;
     $this->depth = $depth;
 }
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->items = array();
 }
Esempio n. 12
0
 public function __construct($content)
 {
     parent::__construct(strtotime($content));
 }
Esempio n. 13
0
 /**
  * @param PropertyAccessorInterface $propertyAccessor
  * @param \Twig_Environment         $twig
  */
 public function __construct(PropertyAccessorInterface $propertyAccessor, \Twig_Environment $twig)
 {
     parent::__construct($propertyAccessor);
     $this->twig = $twig;
 }