コード例 #1
0
ファイル: import.php プロジェクト: alex63530/thelia
function clearTables($con)
{
    echo "Clearing tables\n";
    $productAssociatedContent = Thelia\Model\ProductAssociatedContentQuery::create()->find($con);
    $productAssociatedContent->delete($con);
    $categoryAssociatedContent = Thelia\Model\CategoryAssociatedContentQuery::create()->find($con);
    $categoryAssociatedContent->delete($con);
    $featureProduct = Thelia\Model\FeatureProductQuery::create()->find($con);
    $featureProduct->delete($con);
    $attributeCombination = Thelia\Model\AttributeCombinationQuery::create()->find($con);
    $attributeCombination->delete($con);
    $feature = Thelia\Model\FeatureQuery::create()->find($con);
    $feature->delete($con);
    $feature = Thelia\Model\FeatureI18nQuery::create()->find($con);
    $feature->delete($con);
    $featureAv = Thelia\Model\FeatureAvQuery::create()->find($con);
    $featureAv->delete($con);
    $featureAv = Thelia\Model\FeatureAvI18nQuery::create()->find($con);
    $featureAv->delete($con);
    $attribute = Thelia\Model\AttributeQuery::create()->find($con);
    $attribute->delete($con);
    $attribute = Thelia\Model\AttributeI18nQuery::create()->find($con);
    $attribute->delete($con);
    $attributeAv = Thelia\Model\AttributeAvQuery::create()->find($con);
    $attributeAv->delete($con);
    $attributeAv = Thelia\Model\AttributeAvI18nQuery::create()->find($con);
    $attributeAv->delete($con);
    $brand = Thelia\Model\BrandQuery::create()->find($con);
    $brand->delete($con);
    $brand = Thelia\Model\BrandI18nQuery::create()->find($con);
    $brand->delete($con);
    $category = Thelia\Model\CategoryQuery::create()->find($con);
    $category->delete($con);
    $category = Thelia\Model\CategoryI18nQuery::create()->find($con);
    $category->delete($con);
    $product = Thelia\Model\ProductQuery::create()->find($con);
    $product->delete($con);
    $product = Thelia\Model\ProductI18nQuery::create()->find($con);
    $product->delete($con);
    $folder = Thelia\Model\FolderQuery::create()->find($con);
    $folder->delete($con);
    $folder = Thelia\Model\FolderI18nQuery::create()->find($con);
    $folder->delete($con);
    $content = Thelia\Model\ContentQuery::create()->find($con);
    $content->delete($con);
    $content = Thelia\Model\ContentI18nQuery::create()->find($con);
    $content->delete($con);
    $accessory = Thelia\Model\AccessoryQuery::create()->find($con);
    $accessory->delete($con);
    $stock = \Thelia\Model\ProductSaleElementsQuery::create()->find($con);
    $stock->delete($con);
    $productPrice = \Thelia\Model\ProductPriceQuery::create()->find($con);
    $productPrice->delete($con);
    \Thelia\Model\ProductImageQuery::create()->find($con)->delete($con);
    $customer = Thelia\Model\CustomerQuery::create()->find($con);
    $customer->delete($con);
    echo "Tables cleared with success\n";
}
コード例 #2
0
 /**
  * Returns a new ChildAttributeAvI18nQuery object.
  *
  * @param     string $modelAlias The alias of a model in the query
  * @param     Criteria $criteria Optional Criteria to build the query from
  *
  * @return ChildAttributeAvI18nQuery
  */
 public static function create($modelAlias = null, $criteria = null)
 {
     if ($criteria instanceof \Thelia\Model\AttributeAvI18nQuery) {
         return $criteria;
     }
     $query = new \Thelia\Model\AttributeAvI18nQuery();
     if (null !== $modelAlias) {
         $query->setModelAlias($modelAlias);
     }
     if ($criteria instanceof Criteria) {
         $query->mergeWith($criteria);
     }
     return $query;
 }
コード例 #3
0
ファイル: faker.php プロジェクト: NicolasMugnier/thelia
 $attributeCombination->delete();
 $feature = Thelia\Model\FeatureQuery::create()->find();
 $feature->delete();
 $feature = Thelia\Model\FeatureI18nQuery::create()->find();
 $feature->delete();
 $featureAv = Thelia\Model\FeatureAvQuery::create()->find();
 $featureAv->delete();
 $featureAv = Thelia\Model\FeatureAvI18nQuery::create()->find();
 $featureAv->delete();
 $attribute = Thelia\Model\AttributeQuery::create()->find();
 $attribute->delete();
 $attribute = Thelia\Model\AttributeI18nQuery::create()->find();
 $attribute->delete();
 $attributeAv = Thelia\Model\AttributeAvQuery::create()->find();
 $attributeAv->delete();
 $attributeAv = Thelia\Model\AttributeAvI18nQuery::create()->find();
 $attributeAv->delete();
 $category = Thelia\Model\CategoryQuery::create()->find();
 $category->delete();
 $category = Thelia\Model\CategoryI18nQuery::create()->find();
 $category->delete();
 $product = Thelia\Model\ProductQuery::create()->find();
 $product->delete();
 $product = Thelia\Model\ProductI18nQuery::create()->find();
 $product->delete();
 $customer = Thelia\Model\CustomerQuery::create()->find();
 $customer->delete();
 $admin = Thelia\Model\AdminQuery::create()->find();
 $admin->delete();
 $folder = Thelia\Model\FolderQuery::create()->find();
 $folder->delete();