Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
OptionProvider Class Reference
Inheritance diagram for OptionProvider:
ArrayInterface OptionSourceInterface

Public Member Functions

 toOptionArray ()
 

Data Fields

const PERMANENT = 301
 
const TEMPORARY = 302
 

Detailed Description

@codeCoverageIgnore

Definition at line 15 of file OptionProvider.php.

Member Function Documentation

◆ toOptionArray()

toOptionArray ( )

{Return array of options as value-label pairs

Returns
array Format: array(array('value' => '

', 'label' => '<label>'), ...)}

Implements OptionSourceInterface.

Definition at line 30 of file OptionProvider.php.

31  {
32  return [
33  0 => __('No'),
34  self::TEMPORARY => __('Temporary (302)'),
35  self::PERMANENT => __('Permanent (301)'),
36  ];
37  }
__()
Definition: __.php:13

Field Documentation

◆ PERMANENT

const PERMANENT = 301

Permanent redirect code

Definition at line 20 of file OptionProvider.php.

◆ TEMPORARY

const TEMPORARY = 302

Redirect code

Definition at line 25 of file OptionProvider.php.


The documentation for this class was generated from the following file: