本文整理汇总了PHP中io::ellipsis方法的典型用法代码示例。如果您正苦于以下问题:PHP io::ellipsis方法的具体用法?PHP io::ellipsis怎么用?PHP io::ellipsis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io
的用法示例。
在下文中一共展示了io::ellipsis方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHTMLDescription
/**
* get object HTML description for admin search detail. Usually, the label.
*
* @return string : object HTML description
* @access public
*/
function getHTMLDescription()
{
return io::ellipsis(strip_tags($this->getLabel()), 500, '...', false, false);
}
示例2: CMS_page
$page = CMS_tree::getPageById($_GET['pageId']);
}
if (isset($page) && !$page->hasError()) {
$redirect = '';
$redirectlink = $page->getRedirectLink(true);
if ($redirectlink->hasValidHREF()) {
if ($redirectlink->getLinkType() == RESOURCE_LINK_TYPE_INTERNAL) {
$redirectPage = new CMS_page($redirectlink->getInternalLink());
if (!$redirectPage->hasError()) {
$label = $cms_language->getMessage(MESSAGE_PAGE_PAGE) . ' "' . $redirectPage->getTitle() . '" (' . $redirectPage->getID() . ')';
}
$redirect = '<a href="' . $redirectPage->getURL(false, false, PATH_RELATIVETO_WEBROOT, true) . '">' . io::htmlspecialchars($label) . '</a>';
} else {
$label = $redirectlink->getExternalLink();
$redirectlink->setTarget('_blank');
$redirect = $redirectlink->getHTML(io::ellipsis($label, '80'), MOD_STANDARD_CODENAME, RESOURCE_DATA_LOCATION_EDITED);
}
} else {
$label = $cms_language->getMessage(MESSAGE_PAGE_PAGE) . ' "' . $page->getTitle() . '" (' . $page->getID() . ')';
$redirect = '<a href="' . $page->getURL(false, false, PATH_RELATIVETO_WEBROOT, true) . '">' . io::htmlspecialchars($label) . '</a>';
}
$content = '
<div id="atm-center">
<div class="atm-alert">' . $cms_language->getMessage(MESSAGE_PAGE_REDIRECT, array($redirect)) . '</div>
</div>';
} else {
if (isset($_GET['url'])) {
$url = urldecode($_GET['url']);
if ($page = CMS_tree::analyseURL($url)) {
$label = $cms_language->getMessage(MESSAGE_PAGE_PAGE) . ' "' . $page->getTitle() . '" (' . $page->getID() . ')';
$redirect = '<a href="' . $page->getURL(false, false, PATH_RELATIVETO_WEBROOT, true) . '">' . io::htmlspecialchars($label) . '</a>';
示例3: CMS_page
$tmp = $sibling->getTemplate();
$property = '(' . (is_a($tmp, "CMS_pageTemplate") ? $tmp->getLabel() : '???') . ')';
break;
}
} else {
$property = '(' . $sibling->getID() . ')';
$redirectlink = $sibling->getRedirectLink(true);
if ($redirectlink->hasValidHREF()) {
if ($redirectlink->getLinkType() == RESOURCE_LINK_TYPE_INTERNAL) {
$redirectPage = new CMS_page($redirectlink->getInternalLink());
if (!$redirectPage->hasError()) {
$property .= '<small class="atm-help" ext:qtip="' . $cms_language->getMessage(MESSAGE_PAGE_REDIRECT, array('\'' . $redirectPage->getTitle(true) . '\' (' . $redirectPage->getID() . ')')) . '"> ⇒ ' . $redirectPage->getID() . '</small>';
}
} else {
$label = $redirectlink->getExternalLink();
$property .= '<small class="atm-help" ext:qtip="' . $cms_language->getMessage(MESSAGE_PAGE_REDIRECT, array(io::ellipsis($label, '80'))) . '"> ⇒ ' . io::ellipsis($label, '50') . '</small>';
}
}
}
$pageTitle = PAGE_LINK_NAME_IN_TREE ? $sibling->getLinkTitle() : $sibling->getTitle();
$hasSiblings = CMS_tree::hasSiblings($sibling) ? true : false;
$ddtext = '';
$draggable = $allowDrop = false;
$editableSibling = $cms_user->hasPageClearance($sibling->getId(), CLEARANCE_PAGE_EDIT);
if ($enableDD) {
//does this node draggable ? (/!\ only public nodes can be draggable)
$draggable = !$sibling->isProtected() && $editableSibling && (!$hasSiblings || $cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_REGENERATEPAGES) && $sibling->getID() != APPLICATION_ROOT_PAGE_ID) && $sibling->getPublication() == RESOURCE_PUBLICATION_PUBLIC;
//does this node can be a drop target ?
$allowDrop = !$maxlevelReached && $cms_user->hasPageClearance($sibling->getId(), CLEARANCE_PAGE_EDIT);
//$ddtext = $allowDrop ? ' allowDrop' : '';
}