Пример #1
0
 /**
  * Internal helper function which regenerates all shopware attribute model.
  */
 private function generateModels($path)
 {
     /** @var $generator \Shopware\Components\Model\Generator */
     $generator = new \Shopware\Components\Model\Generator();
     $generator->setPath($path);
     $generator->setModelPath(Shopware()->AppPath('Models'));
     $generator->setSchemaManager($this->Application()->Models()->getConnection()->getSchemaManager());
     return $generator->generateAttributeModels(array());
 }
Пример #2
0
 /**
  * @param array $tableNames
  */
 public function generateAttributeModels($tableNames = array())
 {
     /** @var $generator \Shopware\Components\Model\Generator*/
     $generator = new \Shopware\Components\Model\Generator();
     $generator->setPath($this->getConfiguration()->getAttributeDir());
     $generator->setModelPath(Shopware()->AppPath('Models'));
     $generator->setSchemaManager($this->getConnection()->getSchemaManager());
     $generator->generateAttributeModels($tableNames);
     $this->regenerateAttributeProxies($tableNames);
 }