Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
__construct (\Magento\Eav\Model\ResourceModel\Entity\Attribute $eavEntityAttribute, array $data=[]) | |
getVisibleInCatalogIds () | |
getVisibleInSearchIds () | |
getVisibleInSiteIds () | |
getFlatColumns () | |
getFlatIndexes () | |
getFlatUpdateSelect ($store) | |
setAttribute ($attribute) | |
getAttribute () | |
addValueSortToCollection ($collection, $dir='asc') | |
toOptionArray () | |
![]() | |
__construct (array $data=[]) | |
addData (array $arr) | |
setData ($key, $value=null) | |
unsetData ($key=null) | |
getData ($key='', $index=null) | |
getDataByPath ($path) | |
getDataByKey ($key) | |
setDataUsingMethod ($key, $args=[]) | |
getDataUsingMethod ($key, $args=null) | |
hasData ($key='') | |
toArray (array $keys=[]) | |
convertToArray (array $keys=[]) | |
toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true) | |
toJson (array $keys=[]) | |
convertToJson (array $keys=[]) | |
toString ($format='') | |
__call ($method, $args) | |
isEmpty () | |
serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"') | |
debug ($data=null, &$objects=[]) | |
offsetSet ($offset, $value) | |
offsetExists ($offset) | |
offsetUnset ($offset) | |
offsetGet ($offset) | |
Static Public Member Functions | |
static | getOptionArray () |
static | getAllOption () |
static | getAllOptions () |
static | getOptionText ($optionId) |
Data Fields | |
const | VISIBILITY_NOT_VISIBLE = 1 |
const | VISIBILITY_IN_CATALOG = 2 |
const | VISIBILITY_IN_SEARCH = 3 |
const | VISIBILITY_BOTH = 4 |
Protected Attributes | |
$_attribute | |
$_eavEntityAttribute | |
![]() | |
$_data = [] | |
Additional Inherited Members | |
![]() | |
_getData ($key) | |
_underscore ($name) | |
![]() | |
static | $_underscoreCache = [] |
Catalog Product visibility model and attribute source model
@api
Definition at line 17 of file Visibility.php.
__construct | ( | \Magento\Eav\Model\ResourceModel\Entity\Attribute | $eavEntityAttribute, |
array | $data = [] |
||
) |
Construct
\Magento\Eav\Model\ResourceModel\Entity\Attribute | $eavEntityAttribute | |
array | $data |
Definition at line 47 of file Visibility.php.
addValueSortToCollection | ( | $collection, | |
$dir = 'asc' |
|||
) |
Add Value Sort To Collection Select
\Magento\Eav\Model\Entity\Collection\AbstractCollection | $collection | |
string | $dir | direction |
Definition at line 209 of file Visibility.php.
|
static |
Retrieve all options
Definition at line 105 of file Visibility.php.
|
static |
getAttribute | ( | ) |
Get attribute instance
Definition at line 197 of file Visibility.php.
getFlatColumns | ( | ) |
getFlatIndexes | ( | ) |
getFlatUpdateSelect | ( | $store | ) |
Retrieve Select For Flat Attribute update
int | $store |
Definition at line 175 of file Visibility.php.
|
static |
|
static |
Retrieve option text
int | $optionId |
Definition at line 132 of file Visibility.php.
getVisibleInCatalogIds | ( | ) |
Retrieve visible in catalog ids array
Definition at line 60 of file Visibility.php.
getVisibleInSearchIds | ( | ) |
Retrieve visible in search ids array
Definition at line 70 of file Visibility.php.
getVisibleInSiteIds | ( | ) |
Retrieve visible in site ids array
Definition at line 80 of file Visibility.php.
setAttribute | ( | $attribute | ) |
Set attribute instance
\Magento\Catalog\Model\ResourceModel\Eav\Attribute | $attribute |
Definition at line 186 of file Visibility.php.
toOptionArray | ( | ) |
{Return array of options as value-label pairs
', 'label' => '<label>'), ...)}
Implements OptionSourceInterface.
Definition at line 256 of file Visibility.php.
|
protected |
Definition at line 32 of file Visibility.php.
|
protected |
Definition at line 39 of file Visibility.php.
const VISIBILITY_BOTH = 4 |
Definition at line 25 of file Visibility.php.
const VISIBILITY_IN_CATALOG = 2 |
Definition at line 21 of file Visibility.php.
const VISIBILITY_IN_SEARCH = 3 |
Definition at line 23 of file Visibility.php.
const VISIBILITY_NOT_VISIBLE = 1 |
Definition at line 19 of file Visibility.php.