Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Robots.php
Go to the documentation of this file.
1 <?php
7 
16 use Magento\Robots\Model\Config\Value as RobotsValue;
19 
25 class Robots extends Value implements IdentityInterface
26 {
32  protected $_cacheTag = true;
33 
37  private $storeManager;
38 
52  public function __construct(
53  Context $context,
57  StoreResolver $storeResolver,
58  StoreManagerInterface $storeManager = null,
60  AbstractDb $resourceCollection = null,
61  array $data = []
62  ) {
63  $this->storeManager = $storeManager ?: \Magento\Framework\App\ObjectManager::getInstance()
64  ->get(StoreManagerInterface::class);
65 
66  parent::__construct(
67  $context,
68  $registry,
69  $config,
71  $resource,
72  $resourceCollection,
73  $data
74  );
75  }
76 
82  public function getIdentities()
83  {
84  return [
85  RobotsValue::CACHE_TAG . '_' . $this->storeManager->getStore()->getId(),
86  ];
87  }
88 }
$config
Definition: fraud_order.php:17
__construct(Context $context, Registry $registry, ScopeConfigInterface $config, TypeListInterface $cacheTypeList, StoreResolver $storeResolver, StoreManagerInterface $storeManager=null, AbstractResource $resource=null, AbstractDb $resourceCollection=null, array $data=[])
Definition: Robots.php:52
$resource
Definition: bulk.php:12