/** * Constructor * * @param string|array $caption Caption or array of all attributes * Control attributes: * :include_anon true to include anonymous groups * @param string $name element name * @param boolean $include_anon Include group "anonymous"? * @param mixed $value Pre-selected value (or array of them). * @param integer $size Number or rows. "1" makes a drop-down-list. * @param boolean $multiple Allow multiple selections? */ public function __construct($caption, $name = null, $include_anon = false, $value = null, $size = 1, $multiple = false) { parent::__construct($caption, $name, $value, $size, $multiple); $member_handler = \Xoops::getInstance()->getHandlerMember(); if ($include_anon || $this->get(':include_anon', false)) { $this->addOptionArray($member_handler->getGroupList()); } else { $this->addOptionArray($member_handler->getGroupList(new Criteria('groupid', FixedGroups::ANONYMOUS, '!='))); } }