Ejemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param  array                 $base            Base field data
  * @param  \Tev\Taxonomy\Factory $taxonomyFactory Taxonomy factory
  * @param  \Tev\Term\Factory     $termFactory     Term factory
  * @return void
  */
 public function __construct(array $base, TaxonomyFactory $taxonomyFactory, TermFactory $termFactory)
 {
     parent::__construct($base);
     $this->taxonomyFactory = $taxonomyFactory;
     $this->termFactory = $termFactory;
     $this->_taxonomy = null;
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param  array $data Underlying field data
  * @return void
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     if ($this->base['value']) {
         $this->date = Carbon::createFromFormat($this->base['return_format'], $this->base['value']);
     } else {
         $this->data = null;
     }
     $this->format = $this->base['display_format'];
 }
Ejemplo n.º 3
0
 /**
  * Constructor.
  *
  * @param  array              $base         Repeater field data
  * @param  \Tev\Field\Factory $fieldFactory Field factory
  * @return void
  */
 public function __construct(array $base, FieldFactory $fieldFactory)
 {
     parent::__construct($base);
     $this->fieldFactory = $fieldFactory;
     $this->position = 0;
 }
Ejemplo n.º 4
0
 /**
  * {@inheritDoc}
  */
 public function __construct($data)
 {
     parent::__construct($data);
     $this->normalize();
 }
Ejemplo n.º 5
0
 /**
  * Constructor.
  *
  * @param  array               $base          Base field data
  * @param  \Tev\Author\Factory $authorFactory Author factory
  * @return void
  */
 public function __construct(array $base, AuthorFactory $authorFactory)
 {
     parent::__construct($base);
     $this->authorFactory = $authorFactory;
 }
Ejemplo n.º 6
0
 /**
  * Constructor.
  *
  * @param  array             $base        Base field data
  * @param  \Tev\Post\Factory $postFactory Post factory
  * @return void
  */
 public function __construct(array $base, PostFactory $postFactory)
 {
     parent::__construct($base);
     $this->postFactory = $postFactory;
 }