PHP Class BxDolSiteMaps, dolphin.pro

To add sitemap to your module you need to add a record to 'sys_objects_site_maps' table and custom class: id - autoincremented id for internal usage object - your unique module name, with vendor prefix, lowercase and spaces are underscored priority - priority, allowed values from 0.0 to 1.0 changefreq - how frequently contents change, allowed values: always, hourly, daily, weekly, monthly, yearly, never class_name - your custom class name class_file - file where your class_name is stored order - order in which this sitemap is generated active - is object active, allowed values 0 or 1 You can refer to BoonEx modules for sample record in this table.
Show file Open project: boonex/dolphin.pro Class Usage Examples

Protected Properties

Property Type Description
$BASE_PATH
$BASE_PATH_INDEX url to generated sitemaps
$BASE_URL path to generated sitemaps
$BASE_URL_INDEX path to generated index sitemap
$_aQueryParts
$_aSystem url to generated index sitemap
$_oQuery current sitemap system array

Public Methods

Method Description
deleteAllSiteMaps ( ) delete all sitemaps
generate ( ) generate files for current
generateAllSiteMaps ( ) it is called on cron every day or similar period to generate sitemaps from all modules
getObjectInstance ( $sObject ) : object Get sitemap object instance by object name
getSiteMapIndexPath ( ) get sitemaps index file path
getSiteMapIndexUrl ( ) get sitemaps index file url
getSystems ( ) get all systems

Protected Methods

Method Description
__construct ( $aSystem )
_escape ( $s )
_formatDate ( $iTimestamp )
_genChangeFreq ( $a )
_genDate ( $a )
_genUrl ( $a )
_genXmlUrl ( $a )
_genXmlUrlsBegin ( )
_genXmlUrlsEnd ( )
_getCount ( )
_getDateTimeStamp ( $a )
_getRecords ( $iStart )

Method Details

__construct() protected method

protected __construct ( $aSystem )

_escape() protected static method

protected static _escape ( $s )

_formatDate() protected static method

protected static _formatDate ( $iTimestamp )

_genChangeFreq() protected method

protected _genChangeFreq ( $a )

_genDate() protected method

protected _genDate ( $a )

_genUrl() protected method

protected _genUrl ( $a )

_genXmlUrl() protected method

protected _genXmlUrl ( $a )

_genXmlUrlsBegin() protected method

protected _genXmlUrlsBegin ( )

_genXmlUrlsEnd() protected method

protected _genXmlUrlsEnd ( )

_getCount() protected method

protected _getCount ( )

_getDateTimeStamp() protected method

protected _getDateTimeStamp ( $a )

_getRecords() protected method

protected _getRecords ( $iStart )

deleteAllSiteMaps() public static method

delete all sitemaps
public static deleteAllSiteMaps ( )

generate() public method

generate files for current
public generate ( )

generateAllSiteMaps() public static method

it is called on cron every day or similar period to generate sitemaps from all modules
public static generateAllSiteMaps ( )

getObjectInstance() public static method

Get sitemap object instance by object name
public static getObjectInstance ( $sObject ) : object
$sObject object name
return object instance or false on error

getSiteMapIndexPath() public static method

get sitemaps index file path
public static getSiteMapIndexPath ( )

getSiteMapIndexUrl() public static method

get sitemaps index file url
public static getSiteMapIndexUrl ( )

getSystems() public static method

get all systems
public static getSystems ( )

Property Details

$BASE_PATH protected static property

protected static $BASE_PATH

$BASE_PATH_INDEX protected static property

url to generated sitemaps
protected static $BASE_PATH_INDEX

$BASE_URL protected static property

path to generated sitemaps
protected static $BASE_URL

$BASE_URL_INDEX protected static property

path to generated index sitemap
protected static $BASE_URL_INDEX

$_aQueryParts protected property

protected $_aQueryParts

$_aSystem protected property

url to generated index sitemap
protected $_aSystem

$_oQuery protected property

current sitemap system array
protected $_oQuery