Exemple #1
0
 public function index($id = 0)
 {
     if (EventManager::fire("builderengine_home_override")) {
         return;
     }
     if ($id != 0) {
         return $this->read($id);
     }
     $this->load->model("users");
     $this->show->disable_full_wrapper();
     $this->show->theme('home.php', null);
 }
function fire_action($event, &$arg)
{
    EventManager::fire($event, $arg);
}
 function process_api($par1)
 {
     global $BuilderEngine;
     $this->show->set_frontend();
     $this->load->model('users');
     $argv[0] = "api";
     $argv = array_merge($argv, func_get_args());
     $handler = "";
     $parameters = "";
     $this->parse($argv, $handler, $parameters);
     $parameters_string = implode("/", $parameters[1]);
     $page_path = $argv[0] . "/" . $parameters_string;
     $module_folder = explode("/", $handler[1]);
     /*$result = $this->cache->fetch("cached-page-".$page_path);
       if($result)
       {
           echo $result;
           return;
       }*/
     if (!$BuilderEngine->is_editor_active()) {
         if (isset($handler[0])) {
             $data['contents'] = Modules::run_with_params($handler[0], $parameters[0]);
         }
         if (!isset($handler[0]) || $data['contents'] == "__NO_MODULE__" || $data['contents'] == "__404__") {
             $data['contents'] = Modules::run_with_params($handler[1], $parameters[1]);
         } else {
         }
         if ($data['contents'] == "__404__" || $data['contents'] == "__NO_MODULE__") {
             if (EventManager::fire("builderengine_default_route")) {
                 return;
             }
             return show_404();
         }
         if (isset($_POST['be_editor_frame'])) {
             $this->user->set_session_data('is_editor_active', true);
         }
         $this->show->frontend('full', $data);
     } else {
         $this->show->frontend('full');
     }
 }
 function handle_foot($options = array())
 {
     $this->_integrate_builderengine_js($options);
     EventManager::fire('be_foot');
     echo "<script>";
     EventManager::fire('be_enqueue_scripts');
     echo "</script>";
 }
Exemple #5
0
 public function __construct($id = NULL)
 {
     parent::__construct($id);
     EventManager::fire("builderengine_user_construct", $this);
 }
function fire_action($event)
{
    EventManager::fire($event);
}