コード例 #1
0
 /**
  * Return all feeds as array
  * @param object
  */
 public function getAllFeeds($objDC)
 {
     $objFeeds = \PCT\CustomCatalog\Models\FeedModel::findAll();
     if ($objFeeds === null) {
         return array();
     }
     $arrReturn = array();
     while ($objFeeds->next()) {
         $arrReturn[$objFeeds->id] = $objFeeds->title ?: $objFeeds->alias;
     }
     return $arrReturn;
 }
コード例 #2
0
 /**
  * Return the names of the existing feeds so they are not removed
  * @return array
  */
 public function purgeOldFeeds()
 {
     $arrFeeds = array();
     $objFeeds = FeedModel::findAll();
     if ($objFeeds !== null) {
         while ($objFeeds->next()) {
             $arrFeeds[] = $objFeeds->alias ?: 'customcatalog' . $objFeeds->id;
         }
     }
     return $arrFeeds;
 }