本文整理汇总了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();
}