code: public function renderItems()
      {
          $items = [];
          $index = 0;
          foreach ($this->items as $item) {
              if (!array_key_exists('label', $item)) {
                  throw new InvalidConfigException("The 'label' option is required.");
              }
              $items[] = $this->renderItem($item, ++$index);
          }
          return implode("\n", $items);
      }
docs: Renders collapsible items as specified on [[items]].
  @throws InvalidConfigException if label isn't specified
  @return string the rendering result