<?php
/**
 * Routes
 *
 * example_routes.php will be loaded in main app/config/routes.php file.
 */
Bemmelhor::hookRoutes('Example');

/**
 * Behavior
 *
 * This plugin's Example behavior will be attached whenever Node model is loaded.
 */
Bemmelhor::hookBehavior('Node', 'Example.Example', array());

/**
 * Component
 *
 * This plugin's Example component will be loaded in ALL controllers.
 */
Bemmelhor::hookComponent('*', 'Example.Example');

/**
 * Helper
 *
 * This plugin's Example helper will be loaded via NodesController.
 */
Bemmelhor::hookHelper('Nodes', 'Example.Example');

/**
 * Admin menu (navigation)
 */
BemmelhorNav::add('extensions.children.example', array(
	'title' => __('Example'),
	'url' => '#',
	'children' => array(
		'example1' => array(
			'title' => __('Example 1'),
			'url' => '#',
		),
		'example2' => array(
			'title' => __('Example 2'),
			'url' => '#',
		),
	),
));

/**
 * Admin row action
 *
 * When browsing the content list in admin panel (Content > List),
 * an extra link called 'Example' will be placed under 'Actions' column.
 */
Bemmelhor::hookAdminRowAction('Nodes/admin_index', 'Example', 'plugin:example/controller:example/action:index/:id');

/**
 * Admin tab
 *
 * When adding/editing Content (Nodes),
 * an extra tab with title 'Example' will be shown with markup generated from the plugin's admin_tab_node element.
 *
 * Useful for adding form extra form fields if necessary.
 */
Bemmelhor::hookAdminTab('Nodes/admin_add', 'Example', 'example.admin_tab_node');
Bemmelhor::hookAdminTab('Nodes/admin_edit', 'Example', 'example.admin_tab_node');
