Thread: Class not found
View Single Post
  #4  
Old 03-24-2015, 08:12 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: Class not found

It is located in:
/classes/XLite/Module/Pmall/RadioButtonOptions/View/Product/AttributeValue/Admin/

PHP Code:
namespace XLite\Module\Pmall\RadioButtonOptions\View\Product\AttributeValue\Admin;
/**
 * Attribute value (Radio)
 */
class Radio extends \XLite\View\Product\AttributeValue\Admin\AAdmin
{
    
/**
     * Get dir
     *
     * @return string
     */
    
protected function getDir()
    {
        return 
parent::getDir() . '/radio';
    }
    
/**
     * Return values
     *
     * @return array
     */
    
protected function getAttrValues()
    {
        
$values $this->getAttrValue();
        if (
$values) {
            
$result = array();
            foreach (
$values as $v) {
                
$result[$v->getId()] = $v;
            }
            unset(
$values);
        } else {
            
$result = array(null);
        }
        
$result['NEW_ID'] = null;
        return 
$result;
    }
    
/**
     * Get attribute type
     *
     * @return string
     */
    
protected function getAttributeType()
    {
        return \
XLite\Model\Attribute::TYPE_RADIO;
    }
    
/**
     * Return name of widget class
     *
     * @return string
     */
    
protected function getWidgetClass()
    {
        return 
$this->getAttribute() && !$this->getAttribute()->getProduct()
            ? 
'\XLite\View\FormField\Input\Text\AttributeOption'
            
'\XLite\View\FormField\Input\Text';
    }
    
/**
     * Return field value
     *
     * @param \XLite\Model\AttributeValue\AttributeValueSelect $attributeValue Attribute value
     *
     * @return mixed
     */
    
protected function getFieldValue($attributeValue)
    {
        return 
$attributeValue && $this->getAttribute() && $this->getAttribute()->getProduct()
            ? 
$attributeValue->getAttributeOption()->getName()
            : 
$attributeValue;
    }
    
/**
     * Get value style
     *
     * @param $id Id
     *
     * @return string
     */
    
protected function getValueStyle($id)
    {
        return 
'line clearfix '
            
. (is_int($id) ? 'value' 'new');
    }

__________________
Ver 5.2.6
Reply With Quote