コード例 #1
0
ファイル: File.php プロジェクト: mtornero/slowshop
 /**
  * Initializes the collCategories collection.
  *
  * By default this just sets the collCategories collection to an empty array (like clearcollCategories());
  * however, you may wish to override this method in your stub class to provide setting appropriate
  * to your application -- for example, setting the initial array to the values stored in database.
  *
  * @param      boolean $overrideExisting If set to true, the method call initializes
  *                                        the collection even if it is not empty
  *
  * @return void
  */
 public function initCategories($overrideExisting = true)
 {
     if (null !== $this->collCategories && !$overrideExisting) {
         return;
     }
     $collectionClassName = CategoryTableMap::getTableMap()->getCollectionClassName();
     $this->collCategories = new $collectionClassName();
     $this->collCategories->setModel('\\App\\Propel\\Category');
 }
コード例 #2
0
ファイル: Category.php プロジェクト: mtornero/slowshop
 /**
  * Initializes the $collNestedSetChildren collection.
  *
  * @return     void
  */
 public function initNestedSetChildren()
 {
     $collectionClassName = \App\Propel\Map\CategoryTableMap::getTableMap()->getCollectionClassName();
     $this->collNestedSetChildren = new $collectionClassName();
     $this->collNestedSetChildren->setModel('\\App\\Propel\\Category');
 }