當前位置: 首頁>>代碼示例>>PHP>>正文


PHP user_selector_base::__construct方法代碼示例

本文整理匯總了PHP中user_selector_base::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP user_selector_base::__construct方法的具體用法?PHP user_selector_base::__construct怎麽用?PHP user_selector_base::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在user_selector_base的用法示例。


在下文中一共展示了user_selector_base::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Create instance.
  *
  * @param string $name control name
  * @param array $options should have two elements with keys groupid and courseid.
  */
 public function __construct($name = null, $options = array())
 {
     if (is_null($name)) {
         $name = 'removeselect';
     }
     $options['multiselect'] = false;
     parent::__construct($name, $options);
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:14,代碼來源:admins_existing_selector.php

示例2: __construct

 public function __construct($name, $options)
 {
     $this->companyid = $options['companyid'];
     if (isset($options['courseid'])) {
         $this->courseid = $options['courseid'];
     }
     parent::__construct($name, $options);
 }
開發者ID:sumitnegi933,項目名稱:Moodle_lms_New,代碼行數:8,代碼來源:user_selectors.php

示例3: __construct

 /**
  * @param string $name control name
  * @param array $options should have two elements with keys groupid and courseid.
  */
 public function __construct($name, $options) {
     global $CFG;
     $options['accesscontext'] = context_system::instance();
     parent::__construct($name, $options);
     $this->classid = $options['classid'];
     $this->context = $options['accesscontext'];
     require_once($CFG->dirroot . '/group/lib.php');
 }
開發者ID:anilch,項目名稱:Personel,代碼行數:12,代碼來源:classlib.php

示例4: __construct

 /**
  * Create instance.
  *
  * @param string $name control name
  * @param array $options should have two elements with keys groupid and courseid.
  */
 public function __construct($name = null, $options = array())
 {
     global $CFG;
     if (is_null($name)) {
         $name = 'addselect';
     }
     $options['multiselect'] = false;
     $options['exclude'] = explode(',', $CFG->siteadmins);
     parent::__construct($name, $options);
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:16,代碼來源:admins_potential_selector.php

示例5: __construct

 public function __construct($name, $options)
 {
     parent::__construct($name, $options);
     if (!empty($options['serviceid'])) {
         $this->serviceid = $options['serviceid'];
     } else {
         throw new moodle_exception('serviceidnotfound');
     }
     $this->displayallowedusers = !empty($options['displayallowedusers']);
 }
開發者ID:Burick,項目名稱:moodle,代碼行數:10,代碼來源:lib.php

示例6: __construct

 /**
  * @param string $name control name
  * @param array $options should have two elements with keys groupid and courseid.
  */
 public function __construct($name, $options) {
     global $CFG;        
     $options['accesscontext'] = context_system::instance();
     parent::__construct($name, $options);
     $this->teammanagerid = $options['teammanagerid'];
     if(isset($options['costcenterid']))
     $this->costcenterid = $options['costcenterid'];
     $this->context = $options['accesscontext'];
  
     require_once($CFG->dirroot . '/group/lib.php');
 }
開發者ID:narasimhaeabyas,項目名稱:tataaiapro,代碼行數:15,代碼來源:employeeformlib.php

示例7: __construct

 /**
  * @param string $name control name
  * @param array $options should have two elements with keys groupid and courseid.
  */
 public function __construct($name, $options)
 {
     global $CFG;
     if (isset($options['context'])) {
         $this->context = $options['context'];
     } else {
         $this->context = context::instance_by_id($options['contextid']);
     }
     $options['accesscontext'] = $this->context;
     parent::__construct($name, $options);
     $this->roleid = $options['roleid'];
     require_once $CFG->dirroot . '/group/lib.php';
 }
開發者ID:pzhu2004,項目名稱:moodle,代碼行數:17,代碼來源:assign_user_selector_base.php

示例8: __construct

 /**
  * Constructor.
  *
  * @param string $name the control name/id for use in the HTML.
  * @param array $options other options needed to construct this selector.
  * You must be able to clone a userselector by doing new get_class($us)($us->get_name(), $us->get_options());
  */
 public function __construct($name, $options)
 {
     if (!isset($options['multiselect'])) {
         $options['multiselect'] = false;
     }
     parent::__construct($name, $options);
     $coursecontext = $this->accesscontext->get_course_context(false);
     if ($coursecontext and $coursecontext->id != SITEID and !has_capability('moodle/role:manage', $coursecontext)) {
         // Prevent normal teachers from looking up all users.
         $this->onlyenrolled = true;
     } else {
         $this->onlyenrolled = false;
     }
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:21,代碼來源:check_users_selector.php

示例9: __construct

 /**
  * Constructor method
  * @param string $name
  * @param array $options
  */
 public function __construct($name, $options)
 {
     $options['accesscontext'] = $options['context'];
     parent::__construct($name, $options);
     if (isset($options['context'])) {
         $this->context = $options['context'];
     }
     if (isset($options['currentgroup'])) {
         $this->currentgroup = $options['currentgroup'];
     }
     if (isset($options['forumid'])) {
         $this->forumid = $options['forumid'];
     }
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:19,代碼來源:subscriber_selector_base.php

示例10: __construct

 /**
  * Constructor method
  * @param string $name
  * @param array $options
  */
 public function __construct($name, array $options)
 {
     $options['accesscontext'] = $options['context'];
     parent::__construct($name, $options);
     if (isset($options['context'])) {
         if ($options['context'] instanceof context_system) {
             // If it is a site badge, we need to get context of frontpage.
             $this->context = context_course::instance(SITEID);
         } else {
             $this->context = $options['context'];
         }
     }
     if (isset($options['badgeid'])) {
         $this->badgeid = $options['badgeid'];
     }
     if (isset($options['issuerid'])) {
         $this->issuerid = $options['issuerid'];
     }
     if (isset($options['issuerrole'])) {
         $this->issuerrole = $options['issuerrole'];
     }
 }
開發者ID:Jtgadbois,項目名稱:Pedadida,代碼行數:27,代碼來源:awardlib.php

示例11: __construct

 /**
  * @param string $name control name
  * @param array $options should have two elements with keys groupid and courseid.
  */
 public function __construct()
 {
     global $CFG, $USER;
     parent::__construct('removeselect', array('multiselect' => false));
 }
開發者ID:nmicha,項目名稱:moodle,代碼行數:9,代碼來源:lib.php

示例12: __construct

 public function __construct($name, $options)
 {
     $this->sessionid = $options['sessionid'];
     parent::__construct($name, $options);
 }
開發者ID:CWRTP,項目名稱:facetoface-2.0,代碼行數:5,代碼來源:lib.php

示例13: __construct

 public function __construct($name, $options)
 {
     $this->cohortid = $options['cohortid'];
     parent::__construct($name, $options);
 }
開發者ID:helenagarcia90,項目名稱:moodle,代碼行數:5,代碼來源:locallib.php

示例14: __construct

 public function __construct($name, $options)
 {
     $this->enrolid = $options['enrolid'];
     parent::__construct($name, $options);
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:5,代碼來源:locallib.php

示例15: __construct

    public function __construct($name, $options,$skillset,$position) {

        $this->skillset = $skillset;
        $this->position = $position;
        $this->enrolid  = $options['enrolid'];
        parent::__construct($name, $options);
    }
開發者ID:narasimhaeabyas,項目名稱:tataaiapro,代碼行數:7,代碼來源:courselib.php


注:本文中的user_selector_base::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。