Skip to content

Commit

Permalink
Fixing change requests nuvoleweb#270
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Maira committed Oct 29, 2019
1 parent 19a9c36 commit fc231ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Definition/PatternDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public function __construct(array $definition = []) {
$this->id = $this->definition['id'];
$this->setFields($this->definition['fields']);
$this->setVariants($this->definition['variants']);
// As we know allow hyphens the pattern ID, we need to sanitise it when
// setting pattern theme hook.
$hookFriendlyId = str_replace('-', '_', $this->id());
$this->setThemeHook(self::PATTERN_PREFIX . $hookFriendlyId);
// As we now allow hyphens in pattern IDs we need to turn them into
// underscores when setting the theme hook.
$hook_friendly_id = str_replace('-', '_', $this->id());
$this->setThemeHook(self::PATTERN_PREFIX . $hook_friendly_id);

if (!empty($definition['theme hook'])) {
$this->setThemeHook($definition['theme hook']);
Expand Down

0 comments on commit fc231ec

Please sign in to comment.