예제 #1
0
파일: Controller.php 프로젝트: kingsj/core
 /**
  * Generate XML sitemap links
  *
  * @return void
  */
 public function generateXMLSitemapLinks()
 {
     $iterator = new \XLite\Module\CDev\XMLSitemap\Logic\SitemapIterator();
     $i = 0;
     $options = xmlsitemap_get_changefreq_options();
     $hash = array_flip($options);
     foreach ($iterator as $record) {
         $target = $record['loc']['target'];
         unset($record['loc']['target']);
         $record['loc'] = \XLite\Core\Converter::buildDrupalPath($target, '', $record['loc']);
         $i++;
         $record['type'] = 'lc_connector';
         $record['subtype'] = '';
         $record['id'] = $i;
         if (isset($hash[$record['changefreq']])) {
             $record['changefreq'] = $hash[$record['changefreq']];
         } else {
             unset($record['changefreq']);
         }
         xmlsitemap_link_save($record);
     }
 }
예제 #2
0
파일: Handler.php 프로젝트: kingsj/core
 /**
  * Build CleanURL
  *
  * @param string $target Page identifier
  * @param string $action Action to perform OPTIONAL
  * @param array  $params Additional params OPTIONAL
  *
  * @return string
  */
 protected function buildCleanURL($target, $action = '', array $params = array())
 {
     return \XLite\Core\Converter::buildDrupalPath($target, $action, $params);
 }