|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Escaper $escaper, \Magento\Sitemap\Helper\Data $sitemapData, \Magento\Framework\Filesystem $filesystem, \Magento\Sitemap\Model\ResourceModel\Catalog\CategoryFactory $categoryFactory, \Magento\Sitemap\Model\ResourceModel\Catalog\ProductFactory $productFactory, \Magento\Sitemap\Model\ResourceModel\Cms\PageFactory $cmsFactory, \Magento\Framework\Stdlib\DateTime\DateTime $modelDate, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\RequestInterface $request, \Magento\Framework\Stdlib\DateTime $dateTime, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[], \Magento\Config\Model\Config\Reader\Source\Deployed\DocumentRoot $documentRoot=null, ItemProviderInterface $itemProvider=null, SitemapConfigReaderInterface $configReader=null, \Magento\Sitemap\Model\SitemapItemInterfaceFactory $sitemapItemFactory=null) | |
| addSitemapItem (DataObject $sitemapItem) | |
| beforeSave () | |
| getSitemapUrl ($sitemapPath, $sitemapFileName) | |
| getIdentities () | |
Public Member Functions inherited from AbstractModel | |
| __construct (\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[]) | |
| __sleep () | |
| __wakeup () | |
| setIdFieldName ($name) | |
| getIdFieldName () | |
| getId () | |
| setId ($value) | |
| isDeleted ($isDeleted=null) | |
| hasDataChanges () | |
| setData ($key, $value=null) | |
| unsetData ($key=null) | |
| setDataChanges ($value) | |
| getOrigData ($key=null) | |
| setOrigData ($key=null, $data=null) | |
| dataHasChangedFor ($field) | |
| getResourceName () | |
| getResourceCollection () | |
| getCollection () | |
| load ($modelId, $field=null) | |
| beforeLoad ($identifier, $field=null) | |
| afterLoad () | |
| isSaveAllowed () | |
| setHasDataChanges ($flag) | |
| save () | |
| afterCommitCallback () | |
| isObjectNew ($flag=null) | |
| beforeSave () | |
| validateBeforeSave () | |
| getCacheTags () | |
| cleanModelCache () | |
| afterSave () | |
| delete () | |
| beforeDelete () | |
| afterDelete () | |
| afterDeleteCommit () | |
| getResource () | |
| getEntityId () | |
| setEntityId ($entityId) | |
| clearInstance () | |
| getStoredData () | |
| getEventPrefix () | |
Public Member Functions inherited from DataObject | |
| __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) | |
Data Fields | |
| const | OPEN_TAG_KEY = 'start' |
| const | CLOSE_TAG_KEY = 'end' |
| const | INDEX_FILE_PREFIX = 'sitemap' |
| const | TYPE_INDEX = 'sitemap' |
| const | TYPE_URL = 'url' |
| const | LAST_MOD_MIN_VAL = '0000-01-01 00:00:00' |
Protected Attributes | |
| $_filePath | |
| $_sitemapItems = [] | |
| $_sitemapIncrement = 0 | |
| $_tags = [] | |
| $_lineCount = 0 | |
| $_fileSize = 0 | |
| $_directory | |
| $_stream | |
| $_sitemapData | |
| $_escaper | |
| $_categoryFactory | |
| $_productFactory | |
| $_cmsFactory | |
| $_dateModel | |
| $_storeManager | |
| $_request | |
| $dateTime | |
| $_cacheTag = true | |
Protected Attributes inherited from AbstractModel | |
| $_eventPrefix = 'core_abstract' | |
| $_eventObject = 'object' | |
| $_idFieldName = 'id' | |
| $_hasDataChanges = false | |
| $_origData | |
| $_isDeleted = false | |
| $_resource | |
| $_resourceCollection | |
| $_resourceName | |
| $_collectionName | |
| $_cacheTag = false | |
| $_dataSaveAllowed = true | |
| $_isObjectNew = null | |
| $_validatorBeforeSave = null | |
| $_eventManager | |
| $_cacheManager | |
| $_registry | |
| $_logger | |
| $_appState | |
| $_actionValidator | |
| $storedData = [] | |
Protected Attributes inherited from DataObject | |
| $_data = [] | |
Additional Inherited Members | |
Static Protected Attributes inherited from DataObject | |
| static | $_underscoreCache = [] |
@method string getSitemapType() @method \Magento\Sitemap\Model\Sitemap setSitemapType(string $value) @method string getSitemapFilename() @method \Magento\Sitemap\Model\Sitemap setSitemapFilename(string $value) @method string getSitemapPath() @method \Magento\Sitemap\Model\Sitemap setSitemapPath(string $value) @method string getSitemapTime() @method \Magento\Sitemap\Model\Sitemap setSitemapTime(string $value) @method int getStoreId() @method \Magento\Sitemap\Model\Sitemap setStoreId(int $value) @SuppressWarnings(PHPMD.TooManyFields) @SuppressWarnings(PHPMD.CouplingBetweenObjects) @api
Definition at line 33 of file Sitemap.php.
| __construct | ( | \Magento\Framework\Model\Context | $context, |
| \Magento\Framework\Registry | $registry, | ||
| \Magento\Framework\Escaper | $escaper, | ||
| \Magento\Sitemap\Helper\Data | $sitemapData, | ||
| \Magento\Framework\Filesystem | $filesystem, | ||
| \Magento\Sitemap\Model\ResourceModel\Catalog\CategoryFactory | $categoryFactory, | ||
| \Magento\Sitemap\Model\ResourceModel\Catalog\ProductFactory | $productFactory, | ||
| \Magento\Sitemap\Model\ResourceModel\Cms\PageFactory | $cmsFactory, | ||
| \Magento\Framework\Stdlib\DateTime\DateTime | $modelDate, | ||
| \Magento\Store\Model\StoreManagerInterface | $storeManager, | ||
| \Magento\Framework\App\RequestInterface | $request, | ||
| \Magento\Framework\Stdlib\DateTime | $dateTime, | ||
| \Magento\Framework\Model\ResourceModel\AbstractResource | $resource = null, |
||
| \Magento\Framework\Data\Collection\AbstractDb | $resourceCollection = null, |
||
| array | $data = [], |
||
| \Magento\Config\Model\Config\Reader\Source\Deployed\DocumentRoot | $documentRoot = null, |
||
| ItemProviderInterface | $itemProvider = null, |
||
| SitemapConfigReaderInterface | $configReader = null, |
||
| \Magento\Sitemap\Model\SitemapItemInterfaceFactory | $sitemapItemFactory = null |
||
| ) |
Initialize dependencies.
| \Magento\Framework\Model\Context | $context | |
| \Magento\Framework\Registry | $registry | |
| \Magento\Framework\Escaper | $escaper | |
| \Magento\Sitemap\Helper\Data | $sitemapData | |
| \Magento\Framework\Filesystem | $filesystem | |
| ResourceModel\Catalog\CategoryFactory | $categoryFactory | |
| ResourceModel\Catalog\ProductFactory | $productFactory | |
| ResourceModel\Cms\PageFactory | $cmsFactory | |
| \Magento\Framework\Stdlib\DateTime\DateTime | $modelDate | |
| \Magento\Store\Model\StoreManagerInterface | $storeManager | |
| \Magento\Framework\App\RequestInterface | $request | |
| \Magento\Framework\Stdlib\DateTime | $dateTime | |
| \Magento\Framework\Model\ResourceModel\AbstractResource | null | $resource | |
| \Magento\Framework\Data\Collection\AbstractDb | null | $resourceCollection | |
| array | $data | |
| DocumentRoot | null | $documentRoot | |
| ItemProviderInterface | null | $itemProvider | |
| SitemapConfigReaderInterface | null | $configReader | |
| \Magento\Sitemap\Model\SitemapItemInterfaceFactory | null | $sitemapItemFactory | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 216 of file Sitemap.php.
|
protected |
Add sitemap file to robots.txt
| string | $sitemapFileName |
Definition at line 785 of file Sitemap.php.
|
protected |
|
protected |
Create new sitemap file
| null | string | $fileName | |
| string | $type |
| LocalizedException |
Definition at line 597 of file Sitemap.php.
|
protected |
Generate sitemap index XML file
Definition at line 482 of file Sitemap.php.
|
protected |
Write closing tag and close stream
| string | $type |
Definition at line 629 of file Sitemap.php.
|
protected |
|
protected |
|
protected |
Get current sitemap filename
| int | $index |
Definition at line 647 of file Sitemap.php.
|
protected |
|
protected |
Get date in correct format applicable for lastmod attribute
| string | $date |
Definition at line 707 of file Sitemap.php.
|
protected |
Get media url
| string | $url |
Definition at line 696 of file Sitemap.php.
|
protected |
Get sitemap index row
| string | $sitemapFilename | |
| null | string | $lastmod |
Definition at line 578 of file Sitemap.php.
|
protected |
Get sitemap row
| string | $url | |
| null | string | $lastmod | |
| null | string | $changefreq | |
| null | string | $priority | |
| null | array | \Magento\Framework\DataObject | $images |
Sitemap PageMap
Definition at line 537 of file Sitemap.php.
|
protected |
|
protected |
Get file handler
| LocalizedException |
Definition at line 272 of file Sitemap.php.
|
protected |
|
protected |
|
protected |
Check is enabled submission to robots.txt
Definition at line 771 of file Sitemap.php.
|
protected |
Check is split required
| string | $row |
Definition at line 508 of file Sitemap.php.
|
protected |
| addSitemapItem | ( | DataObject | $sitemapItem | ) |
Add a sitemap item to the array of sitemap items
| DataObject | $sitemapItem |
Definition at line 289 of file Sitemap.php.
| beforeSave | ( | ) |
Check sitemap file location and permissions
| LocalizedException |
Check path is allow
Check exists and writable path
Check allow filename
Definition at line 371 of file Sitemap.php.
| getIdentities | ( | ) |
Get unique page cache identities
Implements IdentityInterface.
Definition at line 852 of file Sitemap.php.
| getSitemapUrl | ( | $sitemapPath, | |
| $sitemapFileName | |||
| ) |
Get sitemap.xml URL according to all config options
| string | $sitemapPath | |
| string | $sitemapFileName |
Definition at line 759 of file Sitemap.php.
|
protected |
Definition at line 162 of file Sitemap.php.
|
protected |
Definition at line 124 of file Sitemap.php.
|
protected |
Definition at line 134 of file Sitemap.php.
|
protected |
Definition at line 139 of file Sitemap.php.
|
protected |
Definition at line 102 of file Sitemap.php.
|
protected |
Definition at line 119 of file Sitemap.php.
|
protected |
Definition at line 55 of file Sitemap.php.
|
protected |
Definition at line 90 of file Sitemap.php.
|
protected |
Definition at line 83 of file Sitemap.php.
|
protected |
Definition at line 129 of file Sitemap.php.
|
protected |
Definition at line 149 of file Sitemap.php.
|
protected |
Definition at line 114 of file Sitemap.php.
|
protected |
Definition at line 69 of file Sitemap.php.
|
protected |
Definition at line 62 of file Sitemap.php.
|
protected |
Definition at line 144 of file Sitemap.php.
|
protected |
Definition at line 107 of file Sitemap.php.
|
protected |
Definition at line 76 of file Sitemap.php.
|
protected |
Definition at line 154 of file Sitemap.php.
| const CLOSE_TAG_KEY = 'end' |
Definition at line 37 of file Sitemap.php.
| const INDEX_FILE_PREFIX = 'sitemap' |
Definition at line 39 of file Sitemap.php.
| const LAST_MOD_MIN_VAL = '0000-01-01 00:00:00' |
Last mode date min value
Definition at line 48 of file Sitemap.php.
| const OPEN_TAG_KEY = 'start' |
Definition at line 35 of file Sitemap.php.
| const TYPE_INDEX = 'sitemap' |
Definition at line 41 of file Sitemap.php.
| const TYPE_URL = 'url' |
Definition at line 43 of file Sitemap.php.