private function getConditionAttribute($settingId)
    {
        $setting = $this->getRow($settingId, 'tl_metamodel_dcasetting');

        if ($setting->dcatype == 'attribute') {
            $attribute     = (object) $this->getRow($setting->attr_id, 'tl_metamodel_attribute');
            $metaModelName = $this->factory->translateIdToMetaModelName($attribute->pid);
            $attribute     = $this->factory->getMetaModel($metaModelName)->getAttributeById($attribute->id);
            if ($attribute) {
                return $attribute->getName();
            }
        } else {
            $title = StringUtil::deserialize($setting->legendtitle, true);
            return isset($title[$GLOBALS['TL_LANGUAGE']]) ? $title[$GLOBALS['TL_LANGUAGE']] : current($title);
        }

        return 'unknown ' . $setting->dcatype;
    }
private function getConditionAttribute($settingId)
    {
        $setting = $this->getRow($settingId, 'tl_metamodel_dcasetting');

        if ($setting->dcatype == 'attribute') {
            $attribute     = (object) $this->getRow($setting->attr_id, 'tl_metamodel_attribute');
            $metaModelName = $this->factory->translateIdToMetaModelName($attribute->pid);
            $attribute     = $this->factory->getMetaModel($metaModelName)->getAttributeById($attribute->id);
            if ($attribute) {
                return $attribute->getName();
            }
        } else {
            $title = StringUtil::deserialize($setting->legendtitle, true);
            return isset($title[$GLOBALS['TL_LANGUAGE']]) ? $title[$GLOBALS['TL_LANGUAGE']] : current($title);
        }

        return 'unknown ' . $setting->dcatype;
    }
private function getConditionAttribute ( $ settingId ) { $ setting = $ this -> getRow ( $ settingId , 'tl_metamodel_dcasetting' ) ; if ( $ setting -> dcatype == 'attribute' ) { $ attribute = ( object ) $ this -> getRow ( $ setting -> attr_id , 'tl_metamodel_attribute' ) ; $ metaModelName = $ this -> factory -> translateIdToMetaModelName ( $ attribute -> pid ) ; $ attribute = $ this -> factory -> getMetaModel ( $ metaModelName ) -> getAttributeById ( $ attribute -> id ) ; if ( $ attribute ) { return $ attribute -> getName ( ) ; } } else { $ title = StringUtil :: deserialize ( $ setting -> legendtitle , true ) ; return isset ( $ title [ $ GLOBALS [ 'TL_LANGUAGE' ] ] ) ? $ title [ $ GLOBALS [ 'TL_LANGUAGE' ] ] : current ( $ title ) ; } return 'unknown ' . $ setting -> dcatype ; }
Calculate the name of a sub palette attribute.

@param string $settingId The id of the tl_metamodel_dcasetting.

@return string

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Calculate the name of a sub palette attribute .