/**
  * Get instance of this object (CssJs)
  *
  * @return sMenu
  */
 public static function getInst()
 {
     // @return Singleton
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Beispiel #2
0
 public function all($directory_id)
 {
     if (empty($directory_id) || !is_numeric($directory_id)) {
         show_404();
     }
     $directory_user = Directory_User::get_user_dir($this->c_user->id, $directory_id, $this->profile->id);
     if (!$directory_user->exists()) {
         return $this->link_to_config();
     }
     JsSettings::instance()->add(array('stars' => (int) $directory_user->directory->stars));
     CssJs::getInst()->add_js(array('libs/raty/jquery.raty.min.js', 'libs/lodash.compat.js'))->c_js();
     $reviews = new Review();
     $reviews->latest_reviews_paged($directory_id, $this->c_user->id, (int) $this->input->get('page'));
     sMenu::getInst()->set_pal('reviews/' . $directory_id);
     $this->template->set('reviews', $reviews);
     $this->template->set('directory_id', $directory_id);
     $this->template->set('type', $directory_user->directory->type);
     $this->template->render();
 }
Beispiel #3
0
<div class="sidebar active">
        <?php 
echo sMenu::getInst()->setRole('settings')->parse_links()->render();
?>

</div>