Set the expandable items in the array so that we have enough information
to attach AJAX events
@param array $expandable
436422
public function set_expandable($expandable) {
        foreach ($expandable as $node) {
            $this->expandable[$node['key'].':'.$node['type']] = $node;
        }
    }
827572
protected function addExpandableField(array $aOptions)
    {
        //  Validation
        if (!array_key_exists('trigger', $aOptions)) {
            throw new ModelException('Expandable fields must define a "trigger".');
        }

        if (!array_key_exists('type', $aOptions)) {
            $aOptions['type'] = static::EXPANDABLE_TYPE_SINGLE;
        }

        if ($aOptions['type'] == static::EXPANDABLE_TYPE_SINGLE && !empty($aOptions['auto_save'])) {
            throw new ModelException(
                'Auto saving an expandable field is incompatible with type static::EXPANDABLE_TYPE_SINGLE'
            );
        } elseif ($aOptions['type'] == static::EXPANDABLE_TYPE_MANY) {
            $bAutoSave = array_key_exists('auto_save', $aOptions) ? !empty($aOptions['auto_save']) : true;
        } else {
            $bAutoSave = false;
        }

        if (!array_key_exists('model', $aOptions)) {
            throw new ModelException('Expandable fields must define a "model".');
        }

        if (!array_key_exists('id_column', $aOptions)) {
            throw new ModelException('Expandable fields must define a "id_column".');
        }

        //  Optional elements
        if (!array_key_exists('property', $aOptions)) {
            $aOptions['property'] = $aOptions['trigger'];
        }

        if (!array_key_exists('provider', $aOptions)) {
            $aOptions['provider'] = 'app';
        }

        $this->aExpandableFields[] = (object) [

            //  The text which triggers this expansion, passed in via $aData['expand']
            'trigger'     => $aOptions['trigger'],

            //  The type of expansion: single or many
            //  This must be one of static::EXPAND_TYPE_SINGLE or static::EXPAND_TYPE_MANY
            'type'        => $aOptions['type'],

            //  What property to assign the results of the expansion to
            'property'    => $aOptions['property'],

            //  Which model to use for the expansion
            'model'       => $aOptions['model'],

            //  The provider of the model
            'provider'    => $aOptions['provider'],

            //  Any data to pass to the getAll (every time)
            'data'        => ArrayHelper::getFromArray('data', $aOptions, []),

            /**
             * The ID column to use; for EXPANDABLE_TYPE_SINGLE this is property of the
             * parent object which contains the ID, for EXPANDABLE_TYPE_MANY, this is the
             * property of the child object which contains the parent's ID.
             */
            'id_column'   => $aOptions['id_column'],

            //  Whether the field is expanded by default
            'auto_expand' => ArrayHelper::getFromArray('auto_expand', $aOptions, false),

            //  Whether to automatically save expanded objects when the trigger is
            //  passed as a key to the create or update methods
            'auto_save'   => $bAutoSave,
        ];

        return $this;
    }
211858
function ExpandableListView(options) {
                var _this = _super.call(this, options) || this;
                _this._statusMgr = null;
                _this._expandManager = null;
                _this._statusMgr = new UI.StatusManager();
                _this._expandManager = new UI.ExpandManager(_this);
                return _this;
            }
483083
public function setExtensions(array $extensions)
    {
        foreach ($extensions as $extension) {
            $this->checkType(CmisExtensionElementInterface::class, $extension);
        }

        $this->extensions = $extensions;
    }
74884
protected function setUnfillableAttributes(array $attributes = [])
    {
        if ( ! empty( $attributes )) {
            $keysToFill = array_diff(array_keys($attributes), $this->fillable);
            foreach ($keysToFill as $key) {
                $this->setAttribute($key, $attributes[$key]);
            }
        }
    }
723765
public function expandable($trueOrFalse = true)
    {
        $this->expandable = (bool) $trueOrFalse;
        if ($this->expandable && $this->collapsable) {
            trigger_error('Expandable cancel the collapsable property', E_USER_NOTICE);
            $this->collapsable = false;
        }
        return $this;
    }
889023
public function addExtension($extension)
    {
        if (($index = array_search($extension, $this->extensions)) !== false) {
            unset($this->extensions[$index]);
        }

        array_unshift($this->extensions, $extension);
    }
117963
public function on ($event, callable $callback)
	{
		if (!isset ($this->events[$event]))
		{
			$this->events[$event] = array ();
		}
		$this->events[$event][] = $callback;
	}
1111892
public function setSearchable($searchable)
    {
        if ($searchable === 'true') {
            $this->searchable = true;

            return $this;
        }
        $this->searchable = false;

        return $this;
    }
139753
public function setAllowedEvents(array $allowedEvents)
    {
        $this->allowedEvents = array_unique(array_merge($this->allowedEvents, $allowedEvents));

        return $this;
    }
1295431
public function setEvents($events)
    {
        $events = (array)$events;
        foreach ($events as $event) {
            $this->addEvent($event);
        }
    }
765989
public function addExtendSelectors($rawValue)
    {
        foreach (Util::splitDelimList($rawValue) as $arg) {
            $extendArg = new ExtendArg($arg);
            $this->extendArgs[$extendArg->raw] = $extendArg;
        }
    }
357089
public function eachFillable(Closure $closure)
    {
        /** @var FillableField $item */
        foreach ($this->items as $item) {
            if ($item->fillable) {
                $closure($item);
            }
        }
    }
848428
public function set(array $adapters, CacheableInterface $item)
    {
        foreach ($adapters as $adapter) {
            $adapter->set($item);
        }
    }
1011699
function initialize() {
  const transition = new ExpandableTransition(
    this.ui.content
  );
  this.transition = transition.init();

  if ( this.ui.content.classList.contains( ExpandableTransition.CLASSES.EXPANDED ) ) {
    this.ui.target.classList.add( this.classes.targetExpanded );
  } else {
    this.ui.target.classList.add( this.classes.targetCollapsed );
  }

  const expandableGroup = closest( this.ui.target, '.' + this.classes.group );

  this.isAccordionGroup = expandableGroup !== null &&
    expandableGroup.classList.contains( this.classes.groupAccordion );

  if ( this.isAccordionGroup ) {
    Events.on(
      'accordionActivated',
      _accordionActivatedHandler.bind( this )
    );
  }
}
398855
public final void setAdapter(@Nullable final ExpandableListAdapter adapter) {
        expandedGroups.clear();

        if (adapter != null) {
            this.adapter = new AdapterWrapper(adapter);
            super.setAdapter(this.adapter);
        } else {
            this.adapter = null;
            super.setAdapter(null);
        }
    }
1103874
public function setAll($items)
    {
        foreach ($items as $key => &$item) {
            if (is_array($item)) {
                throw new \InvalidArgumentException("Array item encountered in DistributedList::setAll() [ key = $key ].");
            } else {
                $item = (string)$item;
            }
        }

        Option::set($this->optionName, serialize($items));
    }