Skip to content

Commit

Permalink
Merge pull request #45 from virtualize/article_bundle_fixes
Browse files Browse the repository at this point in the history
Generator cleanup for article bundle
  • Loading branch information
jockri committed Nov 4, 2014
2 parents b92da5c + 21e10f2 commit 690ebb7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Kunstmaan/GeneratorBundle/Generator/PageGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function ($val) {
$this->sections
),
'adminType' => '\\' . $this->bundle->getNamespace() . '\\Form\\Pages\\' . $this->entity . 'AdminType',
'namespace' => $this->registry->getEntityNamespace($this->bundle->getName()) . '\\Pages\\' . $this->entity
'namespace' => $this->registry->getAliasNamespace($this->bundle->getName()) . '\\Pages\\' . $this->entity
);
$extraCode = $this->render('/Entity/Pages/ExtraFunctions.php', $params);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The article overview page which shows its articles
*
* @ORM\Entity(repositoryClass="{{ namespace }}\Repository\{{ entity_class }}\{{ entity_class }}OverviewPageRepository")
* @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}overviewpages")
* @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}_overviewpages")
*/
class {{ entity_class }}OverviewPage extends AbstractArticleOverviewPage
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

/**
* @ORM\Entity(repositoryClass="{{ namespace }}\Repository\{{ entity_class }}\{{ entity_class }}PageRepository")
* @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}pages")
* @ORM\Table(name="{{ prefix }}{{ entity_class|lower }}_pages")
* @ORM\HasLifecycleCallbacks
*/
class {{ entity_class }}Page extends AbstractArticlePage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace {{ namespace }}\Repository\{{ entity_class }};

use Doctrine\ORM\Query;
use Doctrine\ORM\Query\ResultSetMappingBuilder;
use Kunstmaan\ArticleBundle\Repository\AbstractArticlePageRepository;

Expand Down Expand Up @@ -44,7 +45,7 @@ public function getArticlesQuery($lang = null, $offset, $limit)
$query = "SELECT";
$query .= " article.*";
$query .= " FROM";
$query .= " {{ prefix }}{{ entity_class|lower }}pages as article";
$query .= " {{ prefix }}{{ entity_class|lower }}_pages as article";
$query .= " INNER JOIN";
$query .= " kuma_node_versions nv ON nv.ref_id = article.id";
$query .= " INNER JOIN";
Expand Down

0 comments on commit 690ebb7

Please sign in to comment.