예제 #1
0
파일: entry.php 프로젝트: AdiTal/server
 /**
  * Used to add dynamic JSON attributes to the search index
  */
 public function getDynamicAttributes()
 {
     $dynamicAttributes = array();
     // Map catrgories to creation date
     $categoryEntries = categoryEntryPeer::selectByEntryId($this->getId());
     foreach ($categoryEntries as $categoryEntry) {
         $createdAt = $categoryEntry->getCreatedAt(null);
         // Passing null in order to get a numerical Unix Time Stamp instead of a string
         // Get the dyn. attrib. name in the format of: cat_{cat id}_createdAt (e.g.: cat_123_createdAt)
         $dynAttribName = kCategoryEntryAdvancedFilter::getCategoryCreatedAtDynamicAttributeName($categoryEntry->getCategoryId());
         $dynamicAttributes[$dynAttribName] = $createdAt;
     }
     return $dynamicAttributes;
 }
예제 #2
0
파일: entry.php 프로젝트: wzur/server
 /**
  * Used to add dynamic JSON attributes to the search index
  */
 public function getDynamicAttributes()
 {
     $dynamicAttributes = array();
     // Map catrgories to creation date
     $categoryEntries = categoryEntryPeer::selectByEntryId($this->getId());
     foreach ($categoryEntries as $categoryEntry) {
         $createdAt = $categoryEntry->getCreatedAt(null);
         // Passing null in order to get a numerical Unix Time Stamp instead of a string
         // Get the dyn. attrib. name in the format of: cat_{cat id}_createdAt (e.g.: cat_123_createdAt)
         $dynAttribName = kCategoryEntryAdvancedFilter::getCategoryCreatedAtDynamicAttributeName($categoryEntry->getCategoryId());
         $dynamicAttributes[$dynAttribName] = $createdAt;
     }
     $pluginInstances = KalturaPluginManager::getPluginInstances('IKalturaDynamicAttributesContributer');
     foreach ($pluginInstances as $pluginName => $pluginInstance) {
         try {
             $dynamicAttributes += $pluginInstance->getDynamicAttributes($this);
         } catch (Exception $e) {
             KalturaLog::err($e->getMessage());
             continue;
         }
     }
     return $dynamicAttributes;
 }