Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Robots Class Reference

Public Member Functions

 __construct (ScopeConfigInterface $scopeConfig)
 
 getData ()
 

Detailed Description

Returns data for robots.txt file

Definition at line 14 of file Robots.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ScopeConfigInterface  $scopeConfig)
Parameters
ScopeConfigInterface$scopeConfig

Definition at line 24 of file Robots.php.

26  {
27  $this->scopeConfig = $scopeConfig;
28  }

Member Function Documentation

◆ getData()

getData ( )

Get the main data for robots.txt file as defined in configuration

Returns
string

Definition at line 35 of file Robots.php.

36  {
37  return $this->scopeConfig->getValue(
38  'design/search_engine_robots/custom_instructions',
40  );
41  }

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