/**
  * Basic route example.
  *
  * @param string $type
  *   The content type to generate a path for.
  *
  * @return string
  *   Complete path to the page.
  */
 public static function route($type = '')
 {
     if ($type == '') {
         // No type provided, so assume we are on the main "add content"
         // page.
         return static::$URL;
     } else {
         // A special case for panel pages, which have an extra step in the "create node" process.
         // @todo: at the moment, the panel name is hardcoded which might not be ideal.
         if ($type == 'panel') {
             return 'node/add/panel/flexible';
         }
         $type = parent::route($type);
         return static::$URL . '/' . $type;
     }
 }
 /**
  * Implements route().
  *
  * @param string $type
  *   The content type for which to manage fields.
  *
  * @return string
  *   The correct relative path to the page.
  *
  * @throws \Exception
  */
 public static function route($type = '')
 {
     $type = parent::route($type);
     return str_replace('%selection%', $type, static::$URL);
 }