Skip to content

Commit

Permalink
Add missing options breadcrumb_menu and main_menu. Issue #182
Browse files Browse the repository at this point in the history
  • Loading branch information
shakaran committed Oct 4, 2017
1 parent 35c92b4 commit d952d76
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
8 changes: 8 additions & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ private function createSimpleChildren($rootNodeChildren, $withOptions = TRUE)
->defaultValue(false)
->info('')
->end()
->scalarNode('main_menu')
->defaultValue('AvanzuAdminThemeBundle:MenuBuilder:createMainMenu')
->info('your builder alias')
->end()
->scalarNode('breadcrumb_menu')
->defaultFalse()
->info('Your builder alias or false to disable breadcrumbs')
->end()
->end()
->end();
return $rootNodeChildren;
Expand Down
18 changes: 10 additions & 8 deletions Helper/ContextHelper.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/**
* ContextHelper class
*
* Instead of fully relying on blocks and includes, this class that support
* the twig global named avanzu_admin_context to store and retrieve particular
*
* Instead of fully relying on blocks and includes, this class that support
* the twig global named avanzu_admin_context to store and retrieve particular
* values throughout the page rendering.
*
* This is basically a parameter bag "on-page" with some pre-defined values
*
* This is basically a parameter bag "on-page" with some pre-defined values
* based on the bundle configuration.
*
*
* The implemenation relies in a ArrayObject native PHP object, so it recieves
* all the changes via avanzu_admin_context.options to store the new modified
* values in the internal storage of ArrayObject, which is accessible via the
Expand Down Expand Up @@ -69,7 +69,7 @@ protected function initialize(array $config = [])
/**
* Get attribute method for options. It uses a interal copy array of the
* storage in the ArrayObject
*
*
* @return array
*/
public function getOptions()
Expand Down Expand Up @@ -163,7 +163,9 @@ protected function configureDefaults(OptionsResolver $resolver)
],
'knp_menu' => [
'enable' => false,
'main_menu' => 'AvanzuAdminThemeBundle:MenuBuilder:createMainMenu',
'breadcrumb_menu' => false,
],
]);
}
}
}

0 comments on commit d952d76

Please sign in to comment.