123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Customer\Api\Data;
- /**
- * Customer attribute metadata interface.
- * @api
- * @since 100.0.2
- */
- interface AttributeMetadataInterface extends \Magento\Framework\Api\MetadataObjectInterface
- {
- /**#@+
- * Constants used as keys of data array
- */
- const ATTRIBUTE_CODE = 'attribute_code';
- const FRONTEND_INPUT = 'frontend_input';
- const INPUT_FILTER = 'input_filter';
- const STORE_LABEL = 'store_label';
- const VALIDATION_RULES = 'validation_rules';
- const OPTIONS = 'options';
- const VISIBLE = 'visible';
- const REQUIRED = 'required';
- const MULTILINE_COUNT = 'multiline_count';
- const DATA_MODEL = 'data_model';
- const USER_DEFINED = 'user_defined';
- const FRONTEND_CLASS = 'frontend_class';
- const SORT_ORDER = 'sort_order';
- const FRONTEND_LABEL = 'frontend_label';
- const SYSTEM = 'system';
- const NOTE = 'note';
- const BACKEND_TYPE = 'backend_type';
- const IS_USED_IN_GRID = 'is_used_in_grid';
- const IS_VISIBLE_IN_GRID = 'is_visible_in_grid';
- const IS_FILTERABLE_IN_GRID = 'is_filterable_in_grid';
- const IS_SEARCHABLE_IN_GRID = 'is_searchable_in_grid';
- /**#@-*/
- /**
- * Frontend HTML for input element.
- *
- * @return string
- */
- public function getFrontendInput();
- /**
- * Set frontend HTML for input element.
- *
- * @param string $frontendInput
- * @return $this
- */
- public function setFrontendInput($frontendInput);
- /**
- * Get template used for input (e.g. "date")
- *
- * @return string
- */
- public function getInputFilter();
- /**
- * Set template used for input (e.g. "date")
- *
- * @param string $inputFilter
- * @return $this
- */
- public function setInputFilter($inputFilter);
- /**
- * Get label of the store.
- *
- * @return string
- */
- public function getStoreLabel();
- /**
- * Set label of the store.
- *
- * @param string $storeLabel
- * @return $this
- */
- public function setStoreLabel($storeLabel);
- /**
- * Retrieve validation rules.
- *
- * @return \Magento\Customer\Api\Data\ValidationRuleInterface[]
- */
- public function getValidationRules();
- /**
- * Set validation rules.
- *
- * @param \Magento\Customer\Api\Data\ValidationRuleInterface[] $validationRules
- * @return $this
- */
- public function setValidationRules(array $validationRules);
- /**
- * Number of lines of the attribute value.
- *
- * @return int
- */
- public function getMultilineCount();
- /**
- * Set number of lines of the attribute value.
- *
- * @param int $multilineCount
- * @return $this
- */
- public function setMultilineCount($multilineCount);
- /**
- * Whether attribute is visible on frontend.
- *
- * @return bool
- */
- public function isVisible();
- /**
- * Set whether attribute is visible on frontend.
- *
- * @param bool $isVisible
- * @return $this
- */
- public function setIsVisible($isVisible);
- /**
- * Whether attribute is required.
- *
- * @return bool
- */
- public function isRequired();
- /**
- * Set whether attribute is required.
- *
- * @param bool $isRequired
- * @return $this
- */
- public function setIsRequired($isRequired);
- /**
- * Get data model for attribute.
- *
- * @return string
- */
- public function getDataModel();
- /**
- * Get data model for attribute.
- *
- * @param string $dataModel
- * @return $this
- */
- public function setDataModel($dataModel);
- /**
- * Return options of the attribute (key => value pairs for select)
- *
- * @return \Magento\Customer\Api\Data\OptionInterface[]
- */
- public function getOptions();
- /**
- * Set options of the attribute (key => value pairs for select)
- *
- * @param \Magento\Customer\Api\Data\OptionInterface[] $options
- * @return $this
- */
- public function setOptions(array $options = null);
- /**
- * Get class which is used to display the attribute on frontend.
- *
- * @return string
- */
- public function getFrontendClass();
- /**
- * Set class which is used to display the attribute on frontend.
- *
- * @param string $frontendClass
- * @return $this
- */
- public function setFrontendClass($frontendClass);
- /**
- * Whether current attribute has been defined by a user.
- *
- * @return bool
- */
- public function isUserDefined();
- /**
- * Set whether current attribute has been defined by a user.
- *
- * @param bool $isUserDefined
- * @return $this
- */
- public function setIsUserDefined($isUserDefined);
- /**
- * Get attributes sort order.
- *
- * @return int
- */
- public function getSortOrder();
- /**
- * Get attributes sort order.
- *
- * @param int $sortOrder
- * @return $this
- */
- public function setSortOrder($sortOrder);
- /**
- * Get label which supposed to be displayed on frontend.
- *
- * @return string
- */
- public function getFrontendLabel();
- /**
- * Set label which supposed to be displayed on frontend.
- *
- * @param string $frontendLabel
- * @return $this
- */
- public function setFrontendLabel($frontendLabel);
- /**
- * Get the note attribute for the element.
- *
- * @return string
- */
- public function getNote();
- /**
- * Set the note attribute for the element.
- *
- * @param string $note
- * @return $this
- */
- public function setNote($note);
- /**
- * Whether this is a system attribute.
- *
- * @return bool
- */
- public function isSystem();
- /**
- * Set whether this is a system attribute.
- *
- * @param bool $isSystem
- * @return $this
- */
- public function setIsSystem($isSystem);
- /**
- * Get backend type.
- *
- * @return string
- */
- public function getBackendType();
- /**
- * Set backend type.
- *
- * @param string $backendType
- * @return $this
- */
- public function setBackendType($backendType);
- /**
- * Whether it is used in customer grid
- *
- * @return bool|null
- */
- public function getIsUsedInGrid();
- /**
- * Whether it is visible in customer grid
- *
- * @return bool|null
- */
- public function getIsVisibleInGrid();
- /**
- * Whether it is filterable in customer grid
- *
- * @return bool|null
- */
- public function getIsFilterableInGrid();
- /**
- * Whether it is searchable in customer grid
- *
- * @return bool|null
- */
- public function getIsSearchableInGrid();
- /**
- * Set whether it is used in customer grid
- *
- * @param bool $isUsedInGrid
- * @return $this
- */
- public function setIsUsedInGrid($isUsedInGrid);
- /**
- * Set whether it is visible in customer grid
- *
- * @param bool $isVisibleInGrid
- * @return $this
- */
- public function setIsVisibleInGrid($isVisibleInGrid);
- /**
- * Set whether it is filterable in customer grid
- *
- * @param bool $isFilterableInGrid
- * @return $this
- */
- public function setIsFilterableInGrid($isFilterableInGrid);
- /**
- * Set whether it is searchable in customer grid
- *
- * @param bool $isSearchableInGrid
- * @return $this
- */
- public function setIsSearchableInGrid($isSearchableInGrid);
- }
|