本文整理匯總了PHP中Pimcore\Model\Object\ClassDefinition::getId方法的典型用法代碼示例。如果您正苦於以下問題:PHP ClassDefinition::getId方法的具體用法?PHP ClassDefinition::getId怎麽用?PHP ClassDefinition::getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pimcore\Model\Object\ClassDefinition
的用法示例。
在下文中一共展示了ClassDefinition::getId方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getTableName
/**
* @param Object\ClassDefinition $class
* @param bool $query
* @return string
*/
public function getTableName(Object\ClassDefinition $class, $query = false)
{
if ($query) {
return "object_brick_query_" . $this->model->getKey() . "_" . $class->getId();
} else {
return "object_brick_store_" . $this->model->getKey() . "_" . $class->getId();
}
}
示例2: getCustomLayoutDefinitionForGridColumnConfig
/** Determines the custom layout definition (if necessary) for the given class
* @param ClassDefinition $class
* @param int $objectId
* @return array layout
*/
public static function getCustomLayoutDefinitionForGridColumnConfig(ClassDefinition $class, $objectId)
{
$layoutDefinitions = $class->getLayoutDefinitions();
$result = array("layoutDefinition" => $layoutDefinitions);
if (!$objectId) {
return $result;
}
$user = AdminTool::getCurrentUser();
if ($user->isAdmin()) {
return $result;
}
$mergedFieldDefinition = self::getCustomGridFieldDefinitions($class->getId(), $objectId);
if (is_array($mergedFieldDefinition)) {
if ($mergedFieldDefinition["localizedfields"]) {
$childs = $mergedFieldDefinition["localizedfields"]->getFieldDefinitions();
if (is_array($childs)) {
foreach ($childs as $locKey => $locValue) {
$mergedFieldDefinition[$locKey] = $locValue;
}
}
}
self::doFilterCustomGridFieldDefinitions($layoutDefinitions, $mergedFieldDefinition);
$result["layoutDefinition"] = $layoutDefinitions;
$result["fieldDefinition"] = $mergedFieldDefinition;
}
return $result;
}
示例3: updateClassNameInObjects
/**
* Update the class name in all object
*
* @return void
*/
public function updateClassNameInObjects($newName)
{
$this->db->update("objects", ["o_className" => $newName], $this->db->quoteInto("o_classId = ?", $this->model->getId()));
$this->db->update("object_query_" . $this->model->getId(), ["oo_className" => $newName]);
}
示例4: getTableName
/**
* @param Object\ClassDefinition $class
* @return string
*/
public function getTableName(Object\ClassDefinition $class)
{
return "object_collection_" . $this->model->getKey() . "_" . $class->getId();
}