/** * @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); }
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')); }
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')); }
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']])); }
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')); }
/** * {@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)); }