コード例 #1
0
 /**
  * @param FieldFactory $factory
  */
 protected function _addCommentOptions(FieldFactory $factory)
 {
     $commentsGroup = $factory->getGroup('comments', 'ms.cms.page_type.blog.comments');
     $this->_setPermissions();
     $commentsGroup->add($factory->getField('choice', 'allow_comments', 'ms.cms.page_type.blog.comments_enable')->setFieldOptions(['expanded' => true, 'choices' => ['approve' => 'ms.cms.page_type.blog.require_approval', 'allow' => 'ms.cms.page_type.blog.allow_comments', 'disabled' => 'ms.cms.page_type.blog.disable_comments'], 'data' => 'approve', 'empty_value' => false]));
     $commentsGroup->add($factory->getField('multichoice', 'comment_permission', 'ms.cms.page_type.blog.comment_permission')->setFieldOptions(['expanded' => true, 'choices' => $this->_permissionChoices, 'data' => $this->_permissionSelected]));
     $factory->add($commentsGroup);
 }
コード例 #2
0
 public function setFields(Factory $factory, Product $product = null)
 {
     $factory->add($factory->getField('datalist', 'artist', 'Artist')->setFieldOptions(['choices' => $this->_getArtists()]));
     $factory->add($factory->getField('text', 'title', 'Title'));
     $factory->add($factory->getField('datalist', 'label', 'Label')->setFieldOptions(['choices' => $this->_getLabels()]));
     $factory->add($factory->getField('date', 'releaseDate', 'Release date'));
 }
コード例 #3
0
 protected function _addCrossSellField(FieldFactory $factory)
 {
     $factory->addGroup('cross_sell', 'Cross Sell Products')->setRepeatable(true, 0, 3)->add($factory->getField('product', 'product', 'Product to sell'))->add($factory->getField('productoption', 'option', 'Option requirement'));
 }
コード例 #4
0
 public function setFields(Factory $factory, Product $product = null)
 {
     $factory->add($factory->getField('text', 'year', 'Year'));
     $factory->add($factory->getField('datalist', 'season', 'Season')->setFieldOptions(['choices' => $this->_getSeasons()]));
     $factory->add($factory->getField('richtext', 'fabric', 'Fabric'));
     $factory->add($factory->getField('richtext', 'features', 'Features'));
     $factory->add($factory->getField('richtext', 'care_instructions', 'Care instructions'));
     $factory->add($factory->getField('richtext', 'sizing', 'Sizing'));
     $factory->add($factory->getField('choice', 'gender', 'Gender')->setFieldOptions(['choices' => ['unisex' => 'Unisex', 'male' => 'Male', 'female' => 'Female']]));
 }
コード例 #5
0
 public function setFields(Factory $factory, Product $product = null)
 {
     $factory->add($factory->getField('datalist', 'author', 'Author')->setFieldOptions(['choices' => $this->_getAuthors()]));
     $factory->add($factory->getField('text', 'title', 'Title'));
 }
コード例 #6
0
 /**
  * {@inheritDoc}
  */
 public function setFields(Factory $factory)
 {
     $factory->add($factory->getField('text', 'job_title', 'Job title'));
     $factory->add($factory->getField('richtext', 'biography', 'Biography'));
     $factory->add($factory->getField('file', 'profile_picture', 'Profile picture')->setAllowedTypes(File\Type::IMAGE));
 }