Example #1
0
 /**
  * creates virtual parent id for given sub id
  * default is getOSParentId
  *
  * @param OnlineShop_Framework_ProductInterfaces_IIndexable $object
  * @param $subId
  * @return mixed
  */
 public function createVirtualParentIdForSubId(OnlineShop_Framework_ProductInterfaces_IIndexable $object, $subId)
 {
     return $object->getOSParentId();
 }
Example #2
0
 /**
  * fills queue based on path
  *
  * @param OnlineShop_Framework_ProductInterfaces_IIndexable $object
  */
 public function fillupPreparationQueue(OnlineShop_Framework_ProductInterfaces_IIndexable $object)
 {
     if ($object instanceof \Pimcore\Model\Object\Concrete) {
         //need check, if there are sub objects because update on empty result set is too slow
         $objects = $this->db->fetchCol("SELECT o_id FROM objects WHERE o_path LIKE ?", array($object->getFullPath() . "/%"));
         if ($objects) {
             $updateStatement = "UPDATE " . $this->getStoreTableName() . " SET in_preparation_queue = 1 WHERE tenant = ? AND id IN\n                 (SELECT o_id FROM objects WHERE o_path LIKE ?)";
             $this->db->query($updateStatement, array($this->name, $object->getFullPath() . "/%"));
         }
     }
 }
 public function inIndex(OnlineShop_Framework_ProductInterfaces_IIndexable $object)
 {
     $tenants = $object->getTenants();
     return !empty($tenants);
 }