本文整理匯總了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
}
?>