Skip to content

Commit

Permalink
small improvements in combination with web2print
Browse files Browse the repository at this point in the history
  • Loading branch information
cfasching committed Jun 6, 2016
1 parent 8ef6284 commit 99d1de8
Showing 1 changed file with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,36 @@ public function getLabeledValue($object) {
if(method_exists($object, $getter) || $object instanceof \OnlineShop_Framework_ProductList_DefaultMockup) {
$value = $object->$getter();

$def = $object->getClass()->getFieldDefinition($this->attribute);
if(empty($label)) {
if($def) {
$label = $def->getTitle();
}
}

if(!empty($value) && !empty($brickGetter)) {
$def = \Pimcore\Model\Object\Objectbrick\Definition::getByKey($brickType);
$def = $def->getFieldDefinition($brickKey);
if(empty($label) && !empty($value)) {
if($object instanceof \OnlineShop_Framework_ProductList_DefaultMockup || $object instanceof AbstractObject) {
$def = $object->getClass()->getFieldDefinition($this->attribute);
if(empty($label)) {
if($def) {
$label = $def->getTitle();
$label = $def->getTitle();
}
}

if(!empty($value) && !empty($brickGetter)) {
$def = \Pimcore\Model\Object\Objectbrick\Definition::getByKey($brickType);
$def = $def->getFieldDefinition($brickKey);
if(empty($label) && !empty($value)) {
if($def) {
$label = $def->getTitle();
}
}

if(is_object($value) && method_exists($value, $brickTypeGetter)) {
$value = $value->$brickTypeGetter();

if(is_object($value) && method_exists($value, $brickGetter)) {
$value = $value->$brickGetter();
if(is_object($value) && method_exists($value, $brickTypeGetter)) {
$value = $value->$brickTypeGetter();

if(is_object($value) && method_exists($value, $brickGetter)) {
$value = $value->$brickGetter();
} else {
$value = null;
}

} else {
$value = null;
}

} else {
$value = null;
}
}

Expand Down

0 comments on commit 99d1de8

Please sign in to comment.