description = $description; $this->attribute = $attribute; $this->delayedShippingCategory = $delayedShippingCategory; $this->delayedCollection = $delayedCollection; $this->resource = $resource; return parent::__construct($context, $data); } public function getAttributeData($attribute_code){ return $this->attribute->get($attribute_code); } public function getShippingCategory(){ $_product = $this->description->getProduct(); $option_id = $_product->getShippingCategory(); return $option_id; } public function getDelayedShippingCategories(){ $this->delayedCollection->getSelect()->where("is_delayed = '1'"); return $this->delayedCollection->load(); } public function toOptionArray(){ $options = $this->attribute->get($attribute_code)->getOptions; $options_array = []; foreach($options as $option){ $options_array[] = [ 'label' => $options->getTitle(), 'value' => $options->getId() ]; } } }