当前位置: 首页>>代码示例>>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;未经允许,请勿转载。