public function getEavAttributeByAttributeCode($attributeCode)
    {

        // load the attributes
        $attributes = $this->getAttributes();

        // query whether or not the attribute exists
        if (isset($attributes[$attributeCode])) {
            return $attributes[$attributeCode];
        }

        // throw an exception if the requested attribute is not available
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Can\'t load attribute with code "%s"', $attributeCode)
            )
        );
    }
public function getEavAttributeByAttributeCode($attributeCode)
    {

        // load the attributes
        $attributes = $this->getAttributes();

        // query whether or not the attribute exists
        if (isset($attributes[$attributeCode])) {
            return $attributes[$attributeCode];
        }

        // throw an exception if the requested attribute is not available
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Can\'t load attribute with code "%s"', $attributeCode)
            )
        );
    }
public function getEavAttributeByAttributeCode ( $ attributeCode ) { // load the attributes $ attributes = $ this -> getAttributes ( ) ; // query whether or not the attribute exists if ( isset ( $ attributes [ $ attributeCode ] ) ) { return $ attributes [ $ attributeCode ] ; } // throw an exception if the requested attribute is not available throw new \ Exception ( $ this -> appendExceptionSuffix ( sprintf ( 'Can\'t load attribute with code "%s"' , $ attributeCode ) ) ) ; }
Return's the EAV attribute with the passed attribute code.

@param string $attributeCode The attribute code

@return array The array with the EAV attribute
@throws \Exception Is thrown if the attribute with the passed code is not available
Return s the EAV attribute with the passed attribute code .