Warning: You are browsing the documentation from version 4 to 10 of Pimcore.
Please visit https://pimcore.com/docs/platform/ for the latest versions of Pimcore.
Version:
Edit on GitHub
PHP Code
Allows you to provide a custom operator implementation.
Sample implementation.
<?php
namespace App\Operator;
use Pimcore\DataObject\GridColumnConfig\Operator\AbstractOperator;
use Pimcore\DataObject\GridColumnConfig\ResultContainer;
class OperatorSample extends AbstractOperator
{
private $additionalData;
public function __construct(\stdClass $config, $context = null)
{
parent::__construct($config, $context);
$this->additionalData = $config->additionalData;
}
public function getLabeledValue($element)
{
$childs = $this->getChilds();
$result = new ResultContainer();
$result->setValue($element->getId() . " huhu " . count($childs) . " " . $this->additionalData);
return $result;
}
}