@EXT\Route(
"/node/{id}",
name="hevinci_favourite_index",
requirements={"id" = "\d+"}
)

@EXT\Template()
181759
public function indexAction(ResourceNode $node)
    {
        $resource = $this->manager->getResourceFromNode($node);

        $user = $this->get('security.token_storage')->getToken()->getUser();
        $isFavourite = $this->get('claroline.persistence.object_manager')->getRepository('HeVinciFavouriteBundle:Favourite')
            ->findOneBy(array('user' => $user, 'resourceNode' => $node));

        return array(
            'isFavourite' => $isFavourite ? true : false,
            '_resource' => $resource,
        );
    }
386868
function route(
    $path = '/', $actions, $method = Router::ANY_METHOD, $name = null, array $filters = [], array $events = []
    )
    {
        if (is_array($path)) {
            foreach ($path as $p) {
                $this->collection[$name ?: count($this->collection)] = (new Route($this->Parser))
                        ->route($p, is_array($actions) ? $actions : [$actions], $method, $name, $filters, $events);
            }
        } else {
            $this->collection[$name ?: count($this->collection)] = (new Route($this->Parser))
                    ->route($path, is_array($actions) ? $actions : [$actions], $method, $name, $filters, $events);
        }

        return $this;
    }
491452
def show_ext(self, path, id, **_params):
        """"""
        return self.get(path % id, params=_params)
27696
public function deleteNode($id)
    {
        $this->validate();
        
        $params = [
            'index' => $this->client->getIndex(),
            'type'  => $this->client->getType(),
            'id'    => $id,
        ];
        $responses = $this->client->getClient()->delete($params);
        return $responses['result'];
    }
907294
function _getExtension($id, $cert = NULL, $path = NULL)
    {
        $extensions = $this->_extensions($cert, $path);

        if (!is_array($extensions)) {
            return false;
        }

        foreach ($extensions as $key => $value) {
            if ($value['extnId'] == $id) {
                return $value['extnValue'];
            }
        }

        return false;
    }
7311
protected function setResourceId($id)
    {
        $path = Config::get('nova.path');
        // If the path is the site route, prevent a double-slash
        if ('/' === $path) {
            $path = '';
        }
        return $this->withMeta(['id' => $id, 'nova_path' => $path]);
    }
990275
function(){
    // set up router
    router.route(/^\/(active|completed)$/).param(0).as(function(subset){
      Todo.selected.set(Todo[subset || 'all']);
    });

    // return app root node
    return new Node({
      template: resource('./app/template/layout.tmpl'),
      binding: {
        // nested views
        form: resource('./module/form/index.js'),
        list: resource('./module/list/index.js'),
        stat: resource('./module/stat/index.js')
      }
    });
  }
34652
public function index() {        
        $tree = Globals::getTree();
        $controller = new PageController();
        $controller
        ->setPageTitle(I18N::translate('Certificate'))
        ->restrictAccess(
            $this->module->getSetting('MAJ_SHOW_CERT', Auth::PRIV_HIDE) >= Auth::accessLevel($tree)
        );
        
        $cid = Filter::get('cid');
        
        $certificate = null;
        if(!empty($cid) && strlen($cid) > 22){
            $certificate = Certificate::getInstance($cid, $tree, null, $this->provider);
        }
        
        $data = new ViewBag();
        $data->set('title', $controller->getPageTitle());
        
        $data->set('has_certif', false);
        if($certificate) {
            $controller->restrictAccess($certificate->canShow());
            $data->set('title', $certificate->getTitle());
            $data->set('has_certif', true);
            $data->set('certificate', $certificate);
            
            $data->set(
                'url_certif_city', 
                'module.php?mod=' . Constants::MODULE_MAJ_CERTIF_NAME . 
                    '&mod_action=Certificate@listAll' .
                    '&ged=' . $tree->getNameUrl() .
                    '&city=' . Functions::encryptToSafeBase64($certificate->getCity())
            );
            
            $controller->addInlineJavascript('
                jQuery("#certificate-tabs").tabs();
			    jQuery("#certificate-tabs").css("visibility", "visible");    
            ');
            
            $data->set('has_linked_indis', false);
            $data->set('has_linked_fams', false);
            
            $linked_indis = $certificate->linkedIndividuals();
            $linked_fams = $certificate->linkedFamilies();
                        
            if($linked_indis && count($linked_indis) > 0) {
                $data->set('has_linked_indis', true);
                $data->set('linked_indis', $linked_indis);
            }
            
            if(!empty($linked_fams)) {
                $data->set('has_linked_fams', true);
                $data->set('linked_fams', $linked_fams);
            }
        }
        
        ViewFactory::make('Certificate', $this, $controller, $data)->render();
    }
371857
function get_favorites( $page = 1, $count = 50 )
	{
		$params = array();
		$params['page'] = intval($page);
		$params['count'] = intval($count);

		return $this->oauth->get( 'favorites', $params );
	}
669699
public function index()
    {
        $argv = \Console_Getopt::readPHPArgv();
        $opts = \Console_Getopt::getopt(array_slice($argv, 2, count($argv) - 2), 'h::p::d::r::', null, true);
        if (!empty($opts[0]) && is_array($opts[0])) {
            foreach ($opts[0] as $val) {
                if (!empty($val[0]) && !empty($val[1]) && is_string($val[0]) && is_string($val[1])) {
                    switch ($val[0]) {
                        case 'h':
                            $this->host = $val[1];
                            break;
                        case 'p':
                            $this->port = $val[1];
                            break;
                        case 'd':
                            $this->docroot = $val[1];
                            break;
                        case 'r':
                            $this->router = $val[1];
                            break;
                    }
                }
            }
        }

        $documentRoot = $this->docroot;
        $address = $this->host . ':' . $this->port;
        if (!is_dir($documentRoot)) {
            Lb::app()->stop("Document root \"$documentRoot\" does not exist.\n", self::EXIT_CODE_NO_DOCUMENT_ROOT);
        }
        if ($this->isAddressTaken($address)) {
            Lb::app()->stop("http://$address is taken by another process.\n", self::EXIT_CODE_ADDRESS_TAKEN_BY_ANOTHER_PROCESS);
        }
        if ($this->router !== null && !file_exists($this->router)) {
            Lb::app()->stop("Routing file \"$this->router\" does not exist.\n", self::EXIT_CODE_NO_ROUTING_FILE);
        }
        $this->writeln("Server started on http://{$address}/\n");
        $this->writeln("Document root is \"{$documentRoot}\"\n");
        if ($this->router) {
            $this->writeln("Routing file is \"$this->router\"\n");
        }
        $this->writeln("Quit the server with CTRL-C or COMMAND-C.\n");
        passthru('"' . PHP_BINARY . '"' . " -S {$address} -t \"{$documentRoot}\" $this->router");
    }
1066332
static function eznodeHref( $nodeID, $showPath )
    {
        if ( $showPath == 'true' )
        {
            $node = eZContentObjectTreeNode::fetch( $nodeID, false, false );
            $href = $node ? 'eznode://' . $node['path_identification_string'] : 'eznode://' . $nodeID;
        }
        else
        {
            $href = 'eznode://' . $nodeID;
        }

        return $href;
    }
694811
private function initAPIRoutes()
    {
        $path = Config::get('generator.path_routes', app_path('Http/routes.php'));

        $fileHelper = new FileHelper();
        $routeContents = $fileHelper->getFileContents($path);

        $useDingo = Config::get('generator.use_dingo_api', false);

        if ($useDingo) {
            $template = 'dingo_api_routes_group';
        } else {
            $template = 'api_routes_group';
        }

        $templateHelper = new TemplatesHelper();
        $templateData = $templateHelper->getTemplate($template, 'routes');

        $templateData = $this->fillTemplate($templateData);

        $fileHelper->writeFile($path, $routeContents."\n\n".$templateData);
        $this->comment("\nAPI group added to routes.php");
    }
1070234
function urlAlias()
    {
        $useURLAlias =& $GLOBALS['eZContentObjectTreeNodeUseURLAlias'];
        $ini = eZINI::instance();
        $cleanURL = '';
        if ( !isset( $useURLAlias ) )
        {
            $useURLAlias = $ini->variable( 'URLTranslator', 'Translation' ) == 'enabled';
        }
        if ( $useURLAlias )
        {
            $path = $this->pathWithNames();
            if ( $ini->hasVariable( 'SiteAccessSettings', 'PathPrefix' ) &&
                 $ini->variable( 'SiteAccessSettings', 'PathPrefix' ) != '' )
            {
                $prepend = $ini->variable( 'SiteAccessSettings', 'PathPrefix' );
                $pathIdenStr = substr( $prepend, strlen( $prepend ) -1 ) == '/'
                                ? $path . '/'
                                : $path;
                if ( strncasecmp( $pathIdenStr, $prepend, strlen( $prepend ) ) == 0 )
                    $cleanURL = eZURLAliasML::cleanURL( substr( $path, strlen( $prepend ) ) );
                else
                    $cleanURL = eZURLAliasML::cleanURL( $path );
            }
            else
            {
                $cleanURL = eZURLAliasML::cleanURL( $path );
            }
        }
        else
        {
            $cleanURL = eZURLAliasML::cleanURL( 'content/view/full/' . $this->NodeID );
        }

        return $cleanURL;
    }
413298
public function indexUrl()
    {
        try {
            return route('admin::edit-attribute_group', $this->attribute_group_id);
        } catch (InvalidArgumentException $e) {
            Log::error($e->getMessage());
        }
    }
1085669
function route($path = '/', array $actions = [], $method = Router::ANY_METHOD, $name = '')
    {
        $this->path($path);
        $this->actions[$method] = $actions;
        $this->name = $name;

        return $this;
    }
476154
function favorites_tags_update( $id,  $tags )
	{
		$params = array();
		$params['id'] = $id;
		if (is_array($tags) && !empty($tags)) {
			foreach ($tags as $k => $v) {
				$this->id_format($tags[$k]);
			}
			$params['tags'] = join(',', $tags);
		} else {
			$params['tags'] = $tags;
		}
		return $this->oauth->post( 'favorites/tags/update', $params );
	}
1092833
public function showAction($id, $extra) {
        $entity = $this->container->get("layout.read_handler")->get($id);
        $delete_form = $this->container->get("layout.form_handler")->createDeleteForm($id);


//        $route_collection = $this->container->get('router')->getRouteCollection()->all();
//        echo '<pre>';
//        if(is_object($route_collection))
//            print_r(get_class_methods($route_collection));
//            print_r($route_collection);
//            
//            echo '</pre>';

        $layout = str_replace(":show.html.twig", ":display.html.twig", $this->container->get("request")->get('_layout'));

        $params = array(
            "entity" => $entity
            , "extra" => $extra
        );

        return new Response($this->container->get('templating')->render($layout, $params));
    }