예제 #1
0
 public function call(\Raptor\Raptor $app)
 {
     $this->interactive = $app->getInyector()->get('InteractiveManager');
     $this->interactive->add(array('name' => 'raptor.panel.welcome', 'seconds' => 40, 'style' => array('background' => 'darkblue'), 'next' => 'raptor.panel.start', 'author' => 'amed', 'position' => 'right top'), 'systemBundle');
     $this->interactive->add(array('name' => 'raptor.panel.start', 'seconds' => 20, 'style' => array('background' => 'darkblue'), 'pointer' => '.navbar-nav li:first', 'author' => 'amed', 'position' => 'right top'), 'systemBundle');
     $this->interactive->add(array('name' => 'raptor.configuration.conf', 'seconds' => 60, 'style' => array('background' => 'darkblue'), 'author' => 'amed', 'next' => 'raptor.tools.toolpresent', 'position' => 'right bottom'), 'systemBundle');
     $this->interactive->add(array('name' => 'raptor.start.startopen', 'seconds' => 60, 'style' => array('background' => 'darkblue'), 'pointer' => '.navbar-nav li:eq(1)', 'author' => 'amed', 'position' => 'right top'), 'systemBundle');
     $this->interactive->add(array('name' => 'raptor.tools.toolpresent', 'seconds' => 60, 'waitSeconds' => 45, 'style' => array('background' => 'darkblue'), 'pointer' => '.navbar-nav li:eq(2)', 'author' => 'amed', 'next' => 'raptor.bundle.bundle', 'position' => 'right top'), 'systemBundle');
     $this->interactive->add(array('name' => 'raptor.bundle.bundle', 'seconds' => 45, 'waitSeconds' => 30, 'style' => array('background' => 'darkblue'), 'pointer' => '.navbar-nav>li:eq(3)', 'author' => 'amed', 'next' => 'raptor.account.admin', 'position' => 'right top'), 'systemBundle');
     $this->interactive->add(array('name' => 'raptor.account.admin', 'seconds' => 45, 'waitSeconds' => 30, 'style' => array('background' => 'darkblue'), 'pointer' => '.navbar-nav.navbar-right li:first', 'author' => 'amed', 'position' => 'left top'), 'systemBundle');
     return false;
 }
예제 #2
0
 public function call(\Raptor\Raptor $app)
 {
     /**
      * Add to the inyector container the Interactive Instance
      * 
      */
     $app->getInyector()->add(new \Raptor2\InteractiveBundle\Manager\InteractiveManager());
     $user = '******';
     if ($app->getSecurity()->isAuthenticated()) {
         $array = $app->getSecurity()->getUser();
         $user = $array['username'];
     }
     $store = json_encode(array('reject' => false, 'tutoriales' => array('interactive' => 'This is interactive')));
     if ($app->getCookie('Interactive_' . $user, true) == NULL) {
         $app->setCookie('Interactive_' . $user, $store, strtotime('+1 year'));
     } else {
         $store = $app->getCookie('Interactive_' . $user, true);
     }
     $app->setViewPlugin('core_library_outside', $app->render("@InteractiveBundle/core/core.js.twig", array('url' => $app->request()->getUrl() . $app->request()->getScriptName() . '/interactive/core', 'perfil' => $store)));
     /**
      * Return false to continue the flow of routing
      */
     return false;
 }
예제 #3
0
 /**
  * Inyector de dependencias
  * 
  * Retorna la instancia de la clase registrada anteriormente por 
  * Raptor a traves de su nombre de clase.
  * 
  * Para llamar una clase a traves de esta funcion es necesario haberla registrado
  * anteriormente. Si la clase no existe en el lanzara una exception
  * 
  * 
  * @param string $class El nombre de la clase que sera obtenida del contenedor de dependencias
  * @return object A intance of the specified class
  */
 public function get($class)
 {
     return $this->app->getInyector()->get($class);
 }