Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getData()
 {
     $items = [];
     $skippedItems = 0;
     foreach ($this->getCollection()->getItems() as $attribute) {
         if ($this->configurableAttributeHandler->isAttributeApplicable($attribute)) {
             $items[] = $attribute->toArray();
         } else {
             $skippedItems++;
         }
     }
     return ['totalRecords' => $this->collection->getSize() - $skippedItems, 'items' => $items];
 }