getValue( self::XML_PATH_SHARING_EMAIL_LIMIT, \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); $textLimitInConfig = (int)$scopeConfig->getValue( self::XML_PATH_SHARING_TEXT_LIMIT, \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); $this->sharingEmailLimit = $emailLimitInConfig ?: self::SHARING_EMAIL_LIMIT; $this->_sharignTextLimit = $textLimitInConfig ?: self::SHARING_TEXT_LIMIT; $this->catalogConfig = $catalogConfig; $this->attributeConfig = $attributeConfig; } /** * Get product attributes that need in wishlist * * @return array */ public function getProductAttributes() { $catalogAttributes = $this->catalogConfig->getProductAttributes(); $wishlistAttributes = $this->attributeConfig->getAttributeNames('wishlist_item'); return array_merge($catalogAttributes, $wishlistAttributes); } /** * Retrieve number of emails allowed for sharing wishlist * * @return int */ public function getSharingEmailLimit() { return $this->sharingEmailLimit; } /** * Retrieve maximum length of sharing email text * * @return int */ public function getSharingTextLimit() { return $this->_sharignTextLimit; } }