本文整理汇总了PHP中Link::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Link::render方法的具体用法?PHP Link::render怎么用?PHP Link::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Link
的用法示例。
在下文中一共展示了Link::render方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGeneral
public function testGeneral()
{
$link = new Link();
$link->render();
$link->add('bootstrap.css', 'style/bootstrap.css');
$link->add('slider.css', ['href' => 'style/slider.css', 'type' => 'text/css', 'rel' => 'stylesheet']);
$link->addAll(['more.css' => 'style/more.css', 'more2.css' => ['href' => 'style/more2.css']]);
$link->prependAll(['first0' => 'style/first0.css', 'fist1' => ['href' => 'style/first1.css', 'type' => 'text/css', 'rel' => 'stylesheet']]);
$this->assertNotEmpty($link->get('more.css'));
$link->remove('more.css');
$this->assertEmpty($link->get('more.css'));
$link->prepend('first_of_first', 'style/bootstrap.css');
$link->prepend('first_of_first', ['href' => 'style/bootstrap.css', 'rel' => 'stylesheet']);
$link->render();
}
示例2: render
/**
* Method render
* @access public
* @param boolean $ajax_render [default value: false]
* @return object generate html box with country flag
* @since 1.0.35
*/
public function render($ajax_render = false)
{
$lang_link = BASE_URL . $this->language . "/" . str_replace($this->getPage()->getBaseLanguageURL(), "", $this->getPage()->getCurrentURL());
$lang_link_obj = new Link($lang_link, Link::TARGET_NONE, new Picture("wsp/img/lang/" . $this->language . ".png", 24, 24, 0, Picture::ALIGN_ABSMIDDLE));
$this->object_change = false;
return $lang_link_obj->render();
}
示例3: Link
$oLnkAddJob->setCustom("idnewsletter", $idnewsletter);
$oLnkAddJob->setAlt($aMsg["AddJobTitle"]);
$oLnkAddJob->setContent('<img src="' . $cfg['path']['images'] . 'newsletter_dispatch_16.gif" border="0" title="' . $aMsg["AddJobTitle"] . '" alt="' . $aMsg["AddJobTitle"] . '">');
$sLnkAddJob = $oLnkAddJob->render();
} else {
$sLnkAddJob = '<img src="' . $cfg['path']['images'] . 'newsletter_dispatch_16_off.gif" border="0" title="' . $aMsg["AddJobTitleOff"] . '" alt="' . $aMsg["AddJobTitleOff"] . '" />';
}
$oMenu->setActions($iMenu, 'dispatch', $sLnkAddJob);
}
if ($perm->have_perm_area_action($area, "news_create")) {
$oLnkCopy = new Link();
$oLnkCopy->setMultiLink("news", "", "news", "news_duplicate");
$oLnkCopy->setCustom("idnewsletter", $idnewsletter);
$oLnkCopy->setAlt($aMsg["CopyTitle"]);
$oLnkCopy->setContent('<img src="' . $cfg['path']['images'] . 'but_copy.gif" border="0" title="' . $aMsg["CopyTitle"] . '" alt="' . $aMsg["CopyTitle"] . '">');
$oMenu->setActions($iMenu, 'copy', $oLnkCopy->render());
}
if ($perm->have_perm_area_action($area, "news_delete")) {
$sDelete = '<a title="' . $aMsg["DelTitle"] . '" href="javascript://" onclick="showDelMsg(' . $idnewsletter . ',\'' . addslashes($sName) . '\')"><img src="' . $cfg['path']['images'] . 'delete.gif" border="0" title="' . $aMsg["DelTitle"] . '" alt="' . $aMsg["DelTitle"] . '"></a>';
$oMenu->setActions($iMenu, 'delete', $sDelete);
}
}
// Check destination for sending test newsletter
if ($_REQUEST["selTestDestination"] > 0 && $perm->have_perm_area_action($area, "news_send_test")) {
$oRcpGroups = new RecipientGroupCollection();
$oRcpGroups->setWhere("idclient", $client);
$oRcpGroups->setWhere("idlang", $lang);
$oRcpGroups->setWhere($oRcpGroups->primaryKey, $_REQUEST["selTestDestination"]);
$oRcpGroups->query();
if ($oRcpGroup = $oRcpGroups->next()) {
$sSendTestTarget = sprintf(i18n("Recipient group: %s", $plugin_name), $oRcpGroup->get("groupname"));
示例4: render
/**
* Method render
* @access public
* @param boolean $ajax_render [default value: false]
* @return mixed
* @since 1.0.35
*/
public function render($ajax_render = false)
{
$link_obj = new Object($this->object);
if ($this->picture_16 != "") {
$link_obj = new Object(new Picture($this->picture_16, 16, 16, 0, Picture::ALIGN_ABSMIDDLE, $this->object), $this->object);
}
if (strtoupper($this->page) == "HOME") {
$link_url = BASE_URL . $_SESSION['lang'] . "/";
} else {
if (find($this->page, ".html") == 0) {
$link_url = $this->page . ".html";
} else {
$link_url = $this->page;
}
}
if ($this->get != "") {
if ($this->get[0] == "?") {
$link_url .= $this->get;
} else {
$link_url .= "?" . $this->get;
}
}
$html = new Link($link_url, Link::TARGET_NONE, $link_obj);
if ($this->track_categ != "") {
$html->setTrackEvent($this->track_categ, $this->track_action, $this->track_label);
}
if ($this->tagH != "") {
$html->setTitleTagH($this->tagH, $this->tagH_bold);
}
$this->object_change = false;
return $html->render();
}
示例5: getWorkflowUsers
function getWorkflowUsers($idworkflowitem)
{
global $idworkflow, $cfg;
$ui = new UI_Menu();
$workflowusers = new WorkflowUserSequences();
$workflowusers->select("idworkflowitem = '{$idworkflowitem}'", "", "position ASC");
while ($workflowitem = $workflowusers->next()) {
$pos = $workflowitem->get("position");
$iduser = $workflowitem->get("iduser");
$timelimit = $workflowitem->get("timelimit");
$timeunit = $workflowitem->get("timeunit");
$email = $workflowitem->get("emailnoti");
$escalation = $workflowitem->get("escalationnoti");
$timeunit = $workflowitem->get("timeunit");
$id = $workflowitem->get("idusersequence");
$moveup = new Link();
$moveup->setCLink("workflow_steps", 4, "workflow_user_up");
$moveup->setCustom("idworkflowitem", $idworkflowitem);
$moveup->setCustom("idworkflow", $idworkflow);
$moveup->setCustom("position", $pos);
$moveup->setAlt(i18n("Move user up", "workflow"));
#$moveup->setContent('<img border="0" style="padding-left: 2px" src="images/pfeil_hoch.gif">');
$moveup->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/no_verschieben.gif" . '">');
$movedown = new Link();
$movedown->setCLink("workflow_steps", 4, "workflow_user_down");
$movedown->setCustom("idworkflowitem", $idworkflowitem);
$movedown->setCustom("idworkflow", $idworkflow);
$movedown->setCustom("position", $pos);
$movedown->setAlt(i18n("Move user down", "workflow"));
$movedown->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/nu_verschieben.gif" . '">');
$deletestep = new Link();
$deletestep->setCLink("workflow_steps", 4, "workflow_user_delete");
$deletestep->setCustom("idworkflowitem", $idworkflowitem);
$deletestep->setCustom("idworkflow", $idworkflow);
$deletestep->setCustom("position", $pos);
$deletestep->setCustom("idusersequence", $id);
$deletestep->setAlt(i18n("Delete user", "workflow"));
$deletestep->setContent('<img style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_step_delete.gif" . '">');
$title = "{$pos}. " . getUsers($id, $iduser);
$title .= formGenerateField("text", "wftimelimit" . $id, $timelimit, 3, 6);
$title .= getTimeUnitSelector($id, $timeunit);
$altmail = i18n("Notify this user via E-Mail", "workflow");
$altnoti = i18n("Escalate to this user via E-Mail", "workflow");
$title .= formGenerateCheckbox("wfemailnoti[" . $id . "]", "1", $email) . '<label for="wfemailnoti[' . $id . ']1"><img alt="' . $altmail . '" title="' . $altmail . '" style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_email_noti.gif" . '"></label>';
$title .= formGenerateCheckbox("wfescalnoti[" . $id . "]", "1", $escalation) . '<label for="wfescalnoti[' . $id . ']1"><img alt="' . $altnoti . '" title="' . $altnoti . '" style="padding-left: 2px" border="0" src="' . $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_escal_noti.gif" . '"></label>';
$ui->setTitle($id, $title);
$ui->setLink($id, NULL);
if ($pos > 1) {
$ui->setActions($id, "moveup", $moveup->render());
} else {
$ui->setActions($id, "moveup", '<img style="padding-left: 2px" src="images/spacer.gif" width="15" height="1">');
}
if ($pos < $workflowusers->count()) {
$ui->setActions($id, "movedown", $movedown->render());
} else {
$ui->setActions($id, "movedown", '<img style="padding-left: 2px" src="images/spacer.gif" width="15" height="1">');
}
$ui->setActions($id, "delete", $deletestep->render());
$ui->setImage($id, $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["plugins"] . "workflow/images/workflow_user.gif");
}
$createstep = new Link();
$createstep->setCLink("workflow_steps", 4, "workflow_create_user");
$createstep->setCustom("idworkflow", $idworkflow);
$createstep->setCustom("idworkflowitem", $idworkflowitem);
$ui->setLink("spacer", NULL);
$ui->setTitle("create", '<input class="text_medium" type="submit" name="adduser" value="' . i18n("Add User", "workflow") . '">');
$ui->setLink("create", NULL);
$content = $ui->render(false);
return $content;
}
示例6: link
public static function link($title, $href, array $attributes = array(), $params = null)
{
$control = new Link($title, $href, $attributes, $params);
$control->setEscaper(self::$escaper);
echo $control->render();
}