false])] private false $required = false; #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)] private ?string $slug = null; #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)] private ?string $type = null; /** * Get customFieldGroup. * * @return CustomFieldsGroup */ public function getCustomFieldsGroup() { return $this->customFieldGroup; } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Get name. * * @param mixed|null $locale * * @return array */ public function getName($locale = null) { if ($locale) { if (isset($this->name[$locale])) { return $this->name[$locale]; } foreach ($this->name as $name) { if (!empty($name)) { return $name; } } return ''; } return $this->name; } /** * @return array */ public function getOptions() { return $this->options; } /** * Get order. * * @return float */ public function getOrdering() { return $this->ordering; } /** * alias for isRequired. * * @return bool */ public function getRequired() { return $this->isRequired(); } /** * @return string */ public function getSlug() { return $this->slug; } /** * Get type. * * @return string */ public function getType() { return $this->type; } /** * Returns true if the custom field is active. * * @return bool */ public function isActive() { return $this->active; } /** * return true if the field required. * * @return bool */ public function isRequired() { return $this->required; } /** * Set active. * * @return CustomField */ public function setActive(bool $active) { $this->active = $active; return $this; } /** * Set customFieldGroup. * * @return CustomField */ public function setCustomFieldsGroup(?CustomFieldsGroup $customFieldGroup = null) { $this->customFieldGroup = $customFieldGroup; return $this; } /** * Set name. * * @param array $name * * @return CustomField */ public function setName($name) { $this->name = $name; return $this; } /** * Set options. * * @return CustomField */ public function setOptions(array $options) { $this->options = $options; return $this; } /** * Set order. * * @return CustomField */ public function setOrdering(?float $order) { $this->ordering = $order; return $this; } public function setRequired(bool $required) { $this->required = $required; return $this; } /** * @return $this */ public function setSlug(?string $slug) { $this->slug = $slug; return $this; } /** * Set type. * * @return CustomField */ public function setType(?string $type) { $this->type = $type; return $this; } }