Pimcore\Model\Document\Tag\Areablock::getFromWebserviceImport PHP Метод

getFromWebserviceImport() публичный Метод

public getFromWebserviceImport ( Pimcore\Model\Webservice\Data\Document\Element $wsElement, $document = null, mixed $params = [], null $idMapper = null )
$wsElement Pimcore\Model\Webservice\Data\Document\Element
$params mixed
$idMapper null
    public function getFromWebserviceImport($wsElement, $document = null, $params = [], $idMapper = null)
    {
        $data = $wsElement->value;
        if (($data->indices === null or is_array($data->indices)) and ($data->current == null or is_numeric($data->current)) and ($data->currentIndex == null or is_numeric($data->currentIndex))) {
            $indices = $data["indices"];
            if ($indices instanceof \stdclass) {
                $indices = (array) $indices;
            }
            $this->indices = $indices;
            $this->current = $data->current;
            $this->currentIndex = $data->currentIndex;
        } else {
            throw new \Exception("cannot get  values from web service import - invalid data");
        }
    }