本文整理匯總了PHP中Pimcore\Model\Object\Service::loadAllObjectFields方法的典型用法代碼示例。如果您正苦於以下問題:PHP Service::loadAllObjectFields方法的具體用法?PHP Service::loadAllObjectFields怎麽用?PHP Service::loadAllObjectFields使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pimcore\Model\Object\Service
的用法示例。
在下文中一共展示了Service::loadAllObjectFields方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __clone
/**
* load lazy loaded fields before cloning
* @return void
*/
public function __clone()
{
parent::__clone();
Service::loadAllObjectFields($this);
}
示例2: getObjectConcreteById
/**
* @param $id
* @throws \Exception
*/
public function getObjectConcreteById($id)
{
try {
$object = Object::getById($id);
if ($object instanceof Object\Concrete) {
// load all data (eg. lazy loaded fields like multihref, object, ...)
Object\Service::loadAllObjectFields($object);
$apiObject = Webservice\Data\Mapper::map($object, "\\Pimcore\\Model\\Webservice\\Data\\Object\\Concrete\\Out", "out");
return $apiObject;
}
throw new \Exception("Object with given ID (" . $id . ") does not exist.");
} catch (\Exception $e) {
\Logger::error($e);
throw $e;
}
}
示例3: loadAllFields
/**
* @static
* @param ElementInterface $element
* @return ElementInterface
*/
public static function loadAllFields(ElementInterface $element)
{
if ($element instanceof Document) {
Document\Service::loadAllDocumentFields($element);
} else {
if ($element instanceof Object\Concrete) {
Object\Service::loadAllObjectFields($element);
} else {
if ($element instanceof Asset) {
Asset\Service::loadAllFields($element);
}
}
}
return $element;
}