コード例 #1
0
ファイル: ContextList.php プロジェクト: nidzix/Newscoop
 /**
  * @param bool $randomId
  */
 public function __construct($randomId = FALSE)
 {
     parent::__construct();
     // generate id - unique per page instance
     if (empty(self::$lastId)) {
         self::$lastId = __FILE__;
         if ($randomId) {
             self::$lastId = uniqid();
         }
     }
     $this->id = substr(sha1(self::$lastId), -6);
     self::$lastId = $this->id;
     // column titles
     $this->cols = array('Number' => NULL, 'Language' => getGS('Language'), 'Order' => getGS('Order'));
 }
コード例 #2
0
ファイル: ContextList.php プロジェクト: alvsgithub/Newscoop
 /**
  * @param bool $randomId
  */
 public function __construct($randomId = FALSE)
 {
     parent::__construct();
     $translator = \Zend_Registry::get('container')->getService('translator');
     // generate id - unique per page instance
     if (empty(self::$lastId)) {
         self::$lastId = __FILE__;
         if ($randomId) {
             self::$lastId = uniqid();
         }
     }
     $this->id = substr(sha1(self::$lastId), -6);
     self::$lastId = $this->id;
     // column titles
     $this->cols = array('Number' => NULL, 'Language' => $translator->trans('Language'), 'Order' => $translator->trans('Order'));
 }