本文整理汇总了PHP中tools::getClassInfos方法的典型用法代码示例。如果您正苦于以下问题:PHP tools::getClassInfos方法的具体用法?PHP tools::getClassInfos怎么用?PHP tools::getClassInfos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tools
的用法示例。
在下文中一共展示了tools::getClassInfos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
<?php
$activeModule = \app::$activeModules;
/* Put active module at the top of the list, and remove admin */
unset($activeModule[MODULE]);
$activeModule = array_merge(array(MODULE => '1'), $activeModule);
unset($activeModule['admin']);
$blocksCat = array();
$stylableElements = array();
foreach ($activeModule as $module => $type) {
$blocklist = glob('modules/' . $module . '/blocks/*/block.php');
foreach (is_array($blocklist) ? $blocklist : array() as $path) {
$blockName = substr(strrchr(substr($path, 0, -10), '/block.php'), 1);
if ($blockName !== 'page') {
$blockClassName = $module . '\\blocks\\' . $blockName;
$reflect = new ReflectionClass('\\' . $blockClassName);
$blockInfos = \tools::getClassInfos($reflect);
if (isset($blockInfos['block_category'])) {
$categBlock = $blockInfos['block_category'];
} else {
$categBlock = $module;
}
if (!isset($blocksCat[$categBlock])) {
$blocksCat[$categBlock] = '';
}
if (isset($blockInfos['description'])) {
$description = ucfirst(s($blockInfos['description']));
}
$blocksCat[$categBlock] .= '<div class="admin_core_block tooltip" data-title="' . trim(ucfirst(s($blockInfos['title']))) . '" data-tooltip="' . $description . '" draggable="true" id="' . str_replace('\\', '', $blockClassName) . '" data-block="' . $blockClassName . '" style="background:url(' . BASE_PATH . $module . '/blocks/' . $blockName . '/icon.png) center center no-repeat;"></div>';
}
/* List default stylables selecteurs */
if (is_file('modules/' . $module . '/blocks/' . $blockName . '/default.css')) {
示例2: t
}
$html .= '<input type="hidden" name="oldName"><input type="submit" class="save_field areaWrite" value="' . t('Save property') . '" style="width: 50%;margin: 5px 0 10px 25%;"></div>';
}
}
?>
</div>
</div>
</div>
<div id="canvas">
<?php
$oldSchema = array();
foreach ($moduleObj->getModel() as $entityName => $entity) {
$oldSchema[$entityName] = array();
$reflect = new ReflectionClass('\\' . $module . '\\model\\' . $entityName);
$className = $reflect->getShortName();
$modelInfos = \tools::getClassInfos($reflect);
$tab = array('name' => $className, 'title' => $entity->getTitle(), 'oldName' => $className, 'behaviorTitle' => $entity->behaviorTitle, 'behaviorDescription' => $entity->behaviorDescription, 'behaviorKeywords' => $entity->behaviorKeywords, 'behaviorImage' => $entity->behaviorImage);
echo '<div class="table" data-attributs=\'' . s(json_encode($tab)) . '\' id="table_' . $className . '" style="top:' . $modelInfos['top'] . ';left:' . $modelInfos['left'] . ';"><div class="title">' . $className . '</div>';
$parameters = $entity->getFields();
foreach ($parameters as $propertyName => $field) {
$oldSchema[$entityName][$propertyName] = '';
$class = get_class($field);
if (isset($aliasClasses[$class])) {
$class = $aliasClasses[$class];
}
$reflect = new ReflectionClass($field);
$params = $reflect->getDefaultProperties();
$args = array();
foreach ($params as $name => $defaultValue) {
$args[$name] = $field->{$name};
}