// returns the output data structure for the given product and the output channel productdetail_specification
$specificationOutputChannel = OutputDataConfigToolkitBundle\Service::getOutputDataConfig($product, "productdetail_specification");
//printing output channel in view script with view-helper
foreach($specificationOutputChannel as $property) {
$this->productListSpecification($property, $this->product);
}
namespace OutputDataConfigToolkitBundle\ConfigElement\Operator;
class RemoveZero extends AbstractOperator {
public function __construct($config, $context = null) {
parent::__construct($config, $context);
}
public function getLabeledValue($object) {
$childs = $this->getChilds();
if($childs[0]) {
$value = $childs[0]->getLabeledValue($object);
$value->value = $value->value == 0 ? null : $value->value;
return $value;
}
return null;
}
}
$config = new \OutputDataConfigToolkitBundle\ConfigAttribute\Value\DefaultValue();
$config->applyDefaults(); // datatype, type, class
$config->applyFromClassificationKeyConfig($keyConfig);
// create definition for channel and add value
$newConfig = new \OutputDataConfigToolkitBundle\OutputDefinition();
$newConfig->setChannel("my_channel");
$newConfig->setClassId($classId);
$newConfig->setObjectId(12345);
$newConfig->setConfiguration($serializer->serialize($config, 'json'));
$newConfig->save();
sql
RENAME TABLE plugin_outputdataconfigtoolkit_outputdefinition TO bundle_outputdataconfigtoolkit_outputdefinition;
sql
UPDATE users_permission_definitions SET `key` = REPLACE(`key`, 'plugin_outputDataConfigToolkit', 'bundle_outputDataConfigToolkit');
UPDATE users SET permissions = REPLACE(`permissions`, 'plugin_outputDataConfigToolkit', 'bundle_outputDataConfigToolkit');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.