Skip to content

Commit

Permalink
do not create extra toolbar_groups variable
Browse files Browse the repository at this point in the history
  • Loading branch information
trsteel88 committed May 28, 2012
1 parent a682a0c commit 3a9d126
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Form/Type/CkeditorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public function buildView(FormViewInterface $view, FormInterface $form, array $o
throw new \Exception('You must supply at least 1 toolbar group.');
}

$toolbar_groups = $options['toolbar_groups'];
$toolbar_groups_keys = array_keys($toolbar_groups);
$toolbar_groups_keys = array_keys($options['toolbar_groups']);

$toolbar = array();
foreach($options['toolbar'] as $toolbar_id) {
Expand All @@ -89,8 +88,8 @@ public function buildView(FormViewInterface $view, FormInterface $form, array $o
}

$toolbar[] = array(
'name' => $toolbar_id,
'items' => $toolbar_groups[$toolbar_id],
'name' => $toolbar_id,
'items' => $options['toolbar_groups'][$toolbar_id],
);
}
}
Expand Down

0 comments on commit 3a9d126

Please sign in to comment.