本文整理汇总了PHP中IFilter::filter方法的典型用法代码示例。如果您正苦于以下问题:PHP IFilter::filter方法的具体用法?PHP IFilter::filter怎么用?PHP IFilter::filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IFilter
的用法示例。
在下文中一共展示了IFilter::filter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exportRow
/**
* Export one row
* @param Array $AssociativeRowArray - array containing fieldName=>fieldValue
*/
function exportRow($AssociativeRowArray)
{
if (!$this->filter->filter($AssociativeRowArray)) {
$this->hasLines = true;
$width = 20;
if ($this->rows == 0) {
$this->toReturn .= "<tr class=\"tbHRow\">";
$column = 0;
foreach ($AssociativeRowArray as $field => $value) {
if (!in_array($field, $this->ignoredFields)) {
if ($this->columnSizes != null) {
if ($this->columnSizes[$column]) {
$width = $this->columnSizes[$column];
} else {
$width = 11;
}
}
$this->toReturn .= "<td class=\"tbCell\" style=\"width:{$width}%;\">" . Utils::translate("label.tc." . $field) . "</td>";
$column++;
}
}
if ($this->columnSizes != null) {
$width = $this->columnSizes[count($this->columnSizes) - 1];
}
$this->toReturn .= "<td class=\"tbCell\" style=\"width:{$width}%;\">" . Utils::translate("selected") . "</td>";
$this->toReturn .= "</tr>";
}
$this->rows++;
$this->toReturn .= "<tr class=\"tbRow\">";
$column = 0;
$id = -1;
foreach ($AssociativeRowArray as $field => $value) {
$this->rows++;
if ($field == $this->idField) {
$id = $value;
if ($this->cellRenderer != null) {
$this->cellRenderer->setAName($id);
}
}
if (!in_array($field, $this->ignoredFields)) {
if ($this->columnSizes != null) {
if ($this->columnSizes[$column]) {
$width = $this->columnSizes[$column];
} else {
$width = 11;
}
}
$renderedValue = $value;
if ($this->cellRenderer != null) {
$renderedValue = $this->cellRenderer->render($field, $value);
}
$this->toReturn .= "<td class=\"tbCell\" style=\"width:{$width}%;\">" . $renderedValue . "</td>";
$column++;
}
}
$this->toReturn .= "<td class=\"tbCell\"><input type=\"checkbox\" class=\"cb-element\" value=\"{$id}\" onclick=\"addToDelete({$id});\"/></td>";
$this->toReturn .= "</tr>";
} else {
// row filtered
}
}