Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Data.php
Go to the documentation of this file.
1 <?php
7 
13 
18 {
22  const XML_PATH_SITEMAP_VALID_PATHS = 'sitemap/file/valid_paths';
23 
27  const XML_PATH_PUBLIC_FILES_VALID_PATHS = 'general/file/public_files_valid_paths';
28 
32  const XML_PATH_MAX_LINES = 'sitemap/limit/max_lines';
33 
34  const XML_PATH_MAX_FILE_SIZE = 'sitemap/limit/max_file_size';
35 
41  const XML_PATH_CATEGORY_CHANGEFREQ = 'sitemap/category/changefreq';
42 
43  const XML_PATH_PRODUCT_CHANGEFREQ = 'sitemap/product/changefreq';
44 
45  const XML_PATH_PAGE_CHANGEFREQ = 'sitemap/page/changefreq';
46 
52  const XML_PATH_CATEGORY_PRIORITY = 'sitemap/category/priority';
53 
54  const XML_PATH_PRODUCT_PRIORITY = 'sitemap/product/priority';
55 
56  const XML_PATH_PAGE_PRIORITY = 'sitemap/page/priority';
57 
63  const XML_PATH_SUBMISSION_ROBOTS = 'sitemap/search_engines/submission_robots';
64 
66  const XML_PATH_PRODUCT_IMAGES_INCLUDE = 'sitemap/product/image_include';
67 
77  {
78  return $this->scopeConfig->getValue(
79  self::XML_PATH_MAX_LINES,
81  $storeId
82  );
83  }
84 
93  public function getMaximumFileSize($storeId)
94  {
95  return $this->scopeConfig->getValue(
96  self::XML_PATH_MAX_FILE_SIZE,
98  $storeId
99  );
100  }
101 
111  {
112  return (string)$this->scopeConfig->getValue(
113  self::XML_PATH_CATEGORY_CHANGEFREQ,
115  $storeId
116  );
117  }
118 
128  {
129  return (string)$this->scopeConfig->getValue(
130  self::XML_PATH_PRODUCT_CHANGEFREQ,
132  $storeId
133  );
134  }
135 
144  public function getPageChangefreq($storeId)
145  {
146  return (string)$this->scopeConfig->getValue(
147  self::XML_PATH_PAGE_CHANGEFREQ,
149  $storeId
150  );
151  }
152 
161  public function getCategoryPriority($storeId)
162  {
163  return (string)$this->scopeConfig->getValue(
164  self::XML_PATH_CATEGORY_PRIORITY,
166  $storeId
167  );
168  }
169 
178  public function getProductPriority($storeId)
179  {
180  return (string)$this->scopeConfig->getValue(
181  self::XML_PATH_PRODUCT_PRIORITY,
183  $storeId
184  );
185  }
186 
195  public function getPagePriority($storeId)
196  {
197  return (string)$this->scopeConfig->getValue(
198  self::XML_PATH_PAGE_PRIORITY,
200  $storeId
201  );
202  }
203 
213  {
214  return $this->scopeConfig->getValue(
215  self::XML_PATH_SUBMISSION_ROBOTS,
217  $storeId
218  );
219  }
220 
230  {
231  return (string)$this->scopeConfig->getValue(
232  self::XML_PATH_PRODUCT_IMAGES_INCLUDE,
234  $storeId
235  );
236  }
237 
245  public function getValidPaths()
246  {
247  return array_merge(
248  $this->scopeConfig->getValue(self::XML_PATH_SITEMAP_VALID_PATHS, ScopeInterface::SCOPE_STORE),
249  $this->scopeConfig->getValue(self::XML_PATH_PUBLIC_FILES_VALID_PATHS, ScopeInterface::SCOPE_STORE)
250  );
251  }
252 }
getProductImageIncludePolicy($storeId)
Definition: Data.php:229
const XML_PATH_PRODUCT_IMAGES_INCLUDE
Definition: Data.php:66
getCategoryChangefreq($storeId)
Definition: Data.php:110
const XML_PATH_SITEMAP_VALID_PATHS
Definition: Data.php:22
const XML_PATH_PAGE_CHANGEFREQ
Definition: Data.php:45
const XML_PATH_CATEGORY_CHANGEFREQ
Definition: Data.php:41
const XML_PATH_CATEGORY_PRIORITY
Definition: Data.php:52
const XML_PATH_SUBMISSION_ROBOTS
Definition: Data.php:63
const XML_PATH_PUBLIC_FILES_VALID_PATHS
Definition: Data.php:27
const XML_PATH_PRODUCT_PRIORITY
Definition: Data.php:54
getProductChangefreq($storeId)
Definition: Data.php:127
getCategoryPriority($storeId)
Definition: Data.php:161
const XML_PATH_PRODUCT_CHANGEFREQ
Definition: Data.php:43
getPagePriority($storeId)
Definition: Data.php:195
getMaximumFileSize($storeId)
Definition: Data.php:93
getProductPriority($storeId)
Definition: Data.php:178
getPageChangefreq($storeId)
Definition: Data.php:144
getMaximumLinesNumber($storeId)
Definition: Data.php:76
getEnableSubmissionRobots($storeId)
Definition: Data.php:212