本文整理汇总了PHP中Reports::getRequiredFieldForReport方法的典型用法代码示例。如果您正苦于以下问题:PHP Reports::getRequiredFieldForReport方法的具体用法?PHP Reports::getRequiredFieldForReport怎么用?PHP Reports::getRequiredFieldForReport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Reports
的用法示例。
在下文中一共展示了Reports::getRequiredFieldForReport方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setWidgetsOptions
/**
* Sets the different variables in charge of storing the different dynamic
* fields to be rendered on the report builder page
* @param string $name the report name
*/
private function setWidgetsOptions($name)
{
// Get the list of dynamicaly rendered fields depending the report targeted
$this->widgets = Reports::getRequiredFieldForReport($name);
// Get the list of options for these dynamicaly rendered fields
$this->widgets_options = Reports::getRequiredFieldForReportOptions($name);
// Count the ones that are dedicated to be set on a second line
$this->widgets_second_line_count = 0;
foreach (array_keys($this->widgets) as $widget_name) {
if (isset($this->widgets_options[$widget_name]) && !empty($this->widgets_options[$widget_name]['second_line']) && $this->widgets_options[$widget_name]['second_line']) {
$this->widgets_second_line_count += 1;
}
}
}
示例2: foreach
<th></th>
</tr>
</thead>
<tbody>
<?php
foreach ($reports as $report) {
?>
<tr>
<td><?php
echo Reports::getReportName($report->getName(), $sf_user->getCulture());
?>
<?php
echo image_tag('info.png', 'class=more_trk');
?>
<?php
$widget = Reports::getRequiredFieldForReport($report->getName());
?>
<ul class="field_change">
<?php
foreach ($report->getDiffAsArray() as $field => $value) {
?>
<li><strong><?php
echo __($widget[$field]);
?>
</strong> <?php
echo $value;
?>
</li>
<?php
}
?>