本文整理汇总了PHP中UniteFunctionsRev::normalizeTextareaContent方法的典型用法代码示例。如果您正苦于以下问题:PHP UniteFunctionsRev::normalizeTextareaContent方法的具体用法?PHP UniteFunctionsRev::normalizeTextareaContent怎么用?PHP UniteFunctionsRev::normalizeTextareaContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UniteFunctionsRev
的用法示例。
在下文中一共展示了UniteFunctionsRev::normalizeTextareaContent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: normalizeParams
/**
*
* normalize params
*/
private function normalizeParams($params)
{
$urlImage = UniteFunctionsRev::getVal($params, "image_url");
$urlThumb = UniteFunctionsRev::getVal($params, "slide_thumb");
//init the id if absent
$params["image_id"] = UniteFunctionsRev::getVal($params, "image_id");
if (!empty($urlImage)) {
$urlImage = UniteFunctionJoomlaRev::urlToRelative($urlImage);
}
if (!empty($urlThumb)) {
$urlThumb = UniteFunctionJoomlaRev::urlToRelative($urlThumb);
}
$params["image"] = $urlImage;
$params["slide_thumb"] = $urlThumb;
unset($params["image_url"]);
if (isset($params["video_description"])) {
$params["video_description"] = UniteFunctionsRev::normalizeTextareaContent($params["video_description"]);
}
return $params;
}
示例2: normalizeParams
/**
*
* normalize params
*/
private function normalizeParams($params)
{
$urlImage = UniteFunctionsRev::getVal($params, "image_url");
//init the id if absent
$params["image_id"] = UniteFunctionsRev::getVal($params, "image_id");
$params["image"] = $urlImage;
unset($params["image_url"]);
if (isset($params["video_description"])) {
$params["video_description"] = UniteFunctionsRev::normalizeTextareaContent($params["video_description"]);
}
return $params;
}
示例3: normalizeParams
/**
*
* normalize params
*/
private function normalizeParams($params)
{
$urlImage = $params["image_url"];
if (empty($urlImage)) {
UniteFunctionsRev::throwError("the image could not be empty in params");
}
$params["image"] = $urlImage;
unset($params["image_url"]);
if (isset($params["video_description"])) {
$params["video_description"] = UniteFunctionsRev::normalizeTextareaContent($params["video_description"]);
}
return $params;
}