/** * Get common attributes * * @return array */ protected function getCommonAttributes() { $attributes = parent::getCommonAttributes(); $value = $this->getValue(); if (!$this->getMethod() && $this->getOrderEntity()->getShippingMethodName()) { $value = static::KEY_DELETED; } if ($this->getMethod() && !in_array($this->getMethod()->getMethodId(), array_keys($this->shippingOptions))) { $value = static::KEY_UNAVAILABLE; } $attributes['data-value'] = $value; $attributes['data-request-options'] = !$this->isBuildOptions(); return $attributes; }