<?php
/**
 * Menu Item Interface
 *
 * @author Elze Kool <info@visualmedia.nl>
 */

namespace VisualM\ManagementBundle\Menu;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;

/**
 * Menu Item Interface
 *
 * @author Elze Kool <info@visualmedia.nl>
 */
interface MenuItemInterface
{
    
    /**
     * Get Title
     *
     * @return string Title
     **/
    public function getTitle();

    /**
     * Get IconClass
     *
     * @return string IconClass
     **/
    public function getIconClass();

    /**
     * Get Link
     *
     * @return string Link
     **/
    public function getLink();


    /**
     * Get Children elements
     *
     * @return array Children
     **/
    public function getChildren();
    
    /**
     * Check if Item is active
     *
     * @param Request $request Request
     * 
     * @return boolean Is Active
     */
    public function isActive(Request $request = null);

    /**
     * Check if Item is allowed to display
     *
     * @param Request                       $request Request
     * @param AuthorizationCheckerInterface $context SecurityContext
     *
     * @return boolean Is allowed to display
     */
    public function isAllowedToDisplay(Request $request, AuthorizationCheckerInterface $context = null);


}