本文整理汇总了PHP中Object::showListVal方法的典型用法代码示例。如果您正苦于以下问题:PHP Object::showListVal方法的具体用法?PHP Object::showListVal怎么用?PHP Object::showListVal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Object
的用法示例。
在下文中一共展示了Object::showListVal方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showListVal
function showListVal($attr)
{
global $lll;
if (($s = parent::showListVal($attr)) !== FALSE) {
return $s;
} elseif ($attr == "frequency") {
$s = $this->{$attr} . " " . $lll["hour(s)"];
} else {
$s = parent::showListVal($attr, "safetext");
}
}
示例2: showListVal
function showListVal($attr)
{
global $gorumuser, $gorumroll, $htmlListForum;
$s = FALSE;
if (($s = parent::showListVal($attr)) !== FALSE) {
return $s;
}
if ($attr == "name") {
$ctrl = $this->getLinkCtrl();
return $ctrl->generAnchor($this->getAttr("name"));
}
}
示例3: showListVal
function showListVal($attr)
{
if (($s = parent::showListVal($attr)) !== FALSE) {
return $s;
}
if ($attr == "sortId") {
$s = "<span style='display:none;'>{$this->sortId}</span>";
$s .= CustomField::showMoveTool($this->id);
} else {
$s = parent::showListVal($attr, "safetext");
}
return $s;
}
示例4: showListVal
function showListVal($attr, $format = "", $absolute = FALSE, $fromGetEmailParams = FALSE)
{
global $gorumroll, $lll, $applyCodeBlockSubstitution, $gorumuser, $gorumrecognised;
$s = FALSE;
if (($s = parent::showListVal($attr, "", $absolute)) !== FALSE) {
return $s;
} elseif ($attr == "description") {
$s = $this->getDescription();
} elseif ($attr == "creationtime") {
$s = $this->showDateField($attr, TRUE);
} elseif (preg_match("/col_\\d+/", $attr) || $attr == "id") {
$typ =& $this->getTypeInfo(TRUE);
$attrInfo =& $typ["attributes"][$attr];
$field = $this->getField($attr);
if (in_array("text", $attrInfo) || in_array("textarea", $attrInfo)) {
if ($this->{$attr} === "") {
$s = "";
} else {
if (in_array("allow_html", $attrInfo)) {
$s = $this->getAttr($attr);
if (!empty($applyCodeBlockSubstitution)) {
$s = $this->applyCodeBlockSubstitution($s);
}
} else {
$s = nl2br(htmlspecialchars($this->getAttr($attr)));
}
if ($field->subType == customfield_integer && $field->thousandsSeparator) {
$s = number_format($s, 0, '', $field->getAttr("thousandsSeparator"));
}
if ($field->subType == customfield_float) {
$s = number_format($s, $field->precision, $field->getAttr("precisionSeparator"), $field->getAttr("thousandsSeparator"));
}
if ($field->formatPrefix) {
$s = $field->getAttr("formatPrefix") . $s;
}
if ($field->formatPostfix) {
$s = $s . $field->getAttr("formatPostfix");
}
if ($field->format) {
// ha definialva van egy spec formatum, akkor alkallmazzuk:
$s = sprintf($field->getAttr("format"), $s);
}
$this->applyDisplayLengthLimit($s, $attrInfo);
if (in_array("titleTag", $attrInfo) && $gorumroll->method == "showhtmllist") {
$ctrl = $this->getLinkCtrl($this->{$attr});
$s = $ctrl->generAnchor($s, "", $absolute, "", FALSE);
} elseif (!in_array("allow_html", $attrInfo)) {
$s = preg_replace_callback('{((https?://[\\w-]+)|(www))\\.[\\w\\.-]+}i', create_function('$matches', '$prefix = strcasecmp($matches[1], "www") ? "" : "http://";
return "<a href=\'$prefix$matches[0]\' target=\'_blank\'>$matches[0]</a>";'), $s);
$s = preg_replace('{\\b[\\w.%+-]+@[\\w.-]+\\.[A-Za-z]{2,4}\\b}', '<a href=\'mailto:$0\'>$0</a>', $s);
}
if ($field->useVariableSubstitution && !$fromGetEmailParams) {
$this->variableSubstitution($s, $attr);
}
}
} elseif (in_array("bool", $attrInfo)) {
$s = $this->{$attr} ? $lll["yes"] : $lll["no"];
} elseif (in_array("url", $attrInfo)) {
// htmlspecialchars nelkul:
@($s = $this->{$attr});
} elseif (in_array("selection", $attrInfo) || in_array("multipleselection", $attrInfo) || in_array("checkbox", $attrInfo)) {
$s = $this->displayEnumValue($attr);
} elseif (in_array("media", $attrInfo)) {
if ($this->{$attr}) {
$s = "<a href='" . $this->getUploadDir() . "/{$this->id}" . "_" . $this->{$attr} . "' target='_blank'>" . htmlspecialchars($this->{$attr}) . "</a>";
} else {
$s = "";
}
} elseif (in_array("file", $attrInfo)) {
$picInfo = $this->showPicture($attr, "medium", FALSE, $absolute);
$s = $picInfo["tag"];
} elseif (in_array("date", $attrInfo)) {
$s = $this->showDateField($attr, TRUE);
} else {
$s = parent::showListVal($attr, "safetext");
}
}
return $s;
}
示例5: showListVal
function showListVal($attr, $format = "", $absolute = FALSE, $fromGetEmailParams = FALSE)
{
global $gorumroll, $lll, $gorumuser, $gorumrecognised;
$s = "";
if (($s = parent::showListVal($attr, $format, $absolute, $fromGetEmailParams)) !== FALSE) {
return $s;
}
if ($attr == "title") {
$ctrl = $this->getLinkCtrl($title = $this->getTitle(FALSE));
$s = $ctrl->generAnchor($title, "", $absolute);
} elseif ($attr == "expirationTime") {
if ($this->status && !$this->expirationTime->isEmpty()) {
$_S =& new AppSettings();
//var_dump($this);
$s = round($this->expirationTime->getDayDiff());
if ($this->expirationTime->isPast()) {
$s = "-{$s}";
}
//echo "$this->renewalNum $renewal";
if ($this->expEmailSent && $this->ownerId == $gorumuser->id && $gorumrecognised && $this->renewalNum < $_S->renewal) {
$ctrl =& new AppController("item/prolong_expiration/{$this->id}");
$s .= " " . $ctrl->generAnchor($lll["prolongExp"], "", $absolute);
}
} else {
$s = $lll["N/A"];
}
} elseif ($attr == "shoppingCartLink" && $withShoppingCart) {
$ctrl =& new AppController("shoppingcart/create_form/{$this->id}");
$s = $ctrl->generImageAnchor("i/add2cart.gif", $lll["addToChart"]);
} elseif ($attr == "responded" || $attr == "clicked") {
$s = $this->{$attr};
} else {
$s = Object::showListVal($attr, $format, "safetext");
}
return $s;
}
示例6: showListVal
function showListVal($attr)
{
global $lll;
if ($attr == "catName") {
if (!$this->cid) {
return $lll["allCategories"];
}
$c = new AppCategory();
$c->id = $this->cid;
$c->name = $this->catName;
$c->permaLink = $this->catPermaLink;
return $c->showListVal("name");
} elseif (($s = parent::showListVal($attr)) !== FALSE) {
return $s;
} else {
$s = parent::showListVal($attr, "safetext");
}
return $s;
}
示例7: showListVal
function showListVal($attr)
{
global $lll;
$s = "";
if (($s = parent::showListVal($attr)) !== FALSE) {
return $s;
}
if ($attr == "cid") {
if (!$this->cid) {
return $lll["allCategories"];
} else {
return htmlspecialchars(G::getAttr($this->cid, "appcategory", "name"));
}
} elseif ($attr == "listTitle") {
if ($this->id == 1) {
return parent::showListVal($attr, "safetext");
} else {
return parent::showListVal($attr, "detailslink");
}
} else {
$s = Object::showListVal($attr, "safetext");
}
return $s;
}