Exemplo n.º 1
0
 /**
  * Get new Category active record instance
  *
  * @param ActiveTreeNode $parent
  * @return Category
  */
 public static function getNewInstance(Category $parent)
 {
     $category = parent::getNewInstance(__CLASS__, $parent);
     $category->activeProductCount->set(0);
     $category->availableProductCount->set(0);
     $category->totalProductCount->set(0);
     return $category;
 }
Exemplo n.º 2
0
 public static function getNewInstance(DiscountCondition $parentCondition = null)
 {
     if (!$parentCondition) {
         $parentCondition = self::getRootNode();
     }
     return parent::getNewInstance(__CLASS__, $parentCondition);
 }