Skip to content

Commit

Permalink
Merge pull request #145 from andersbjorkland/master
Browse files Browse the repository at this point in the history
Add $ to generated property variableName. Fixes #144
  • Loading branch information
Firesphere authored Oct 26, 2022
2 parents 370bf4e + e5f6340 commit 0589668
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Generators/ControllerTagGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function generateControllerObjectTags()
if (class_exists($pageClassname) && $this->isContentController($this->className)) {
$pageClassname = $this->getAnnotationClassName($pageClassname);

$this->pushPropertyTag(sprintf('%s dataRecord', $pageClassname));
$this->pushPropertyTag(sprintf('%s $dataRecord', $pageClassname));
$this->pushMethodTag('data()', sprintf('%s data()', $pageClassname));

// don't mixin Page, since this is a ContentController method
Expand All @@ -56,7 +56,7 @@ protected function generateControllerObjectTags()
} elseif ($this->isContentController($this->className) && array_key_exists($this->className, self::$pageClassesCache)) {
$pageClassname = $this->getAnnotationClassName(self::$pageClassesCache[$this->className]);

$this->pushPropertyTag(sprintf('%s dataRecord', $pageClassname));
$this->pushPropertyTag(sprintf('%s $dataRecord', $pageClassname));
$this->pushMethodTag('data()', sprintf('%s data()', $pageClassname));

// don't mixin Page, since this is a ContentController method
Expand Down

0 comments on commit 0589668

Please sign in to comment.