當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Brick::text方法代碼示例

本文整理匯總了PHP中Brick::text方法的典型用法代碼示例。如果您正苦於以下問題:PHP Brick::text方法的具體用法?PHP Brick::text怎麽用?PHP Brick::text使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Brick的用法示例。


在下文中一共展示了Brick::text方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: time

 public static function time($timestamp, $format = 'short', $classes = '')
 {
     $brick = new Brick('time');
     $brick->datetime = Date::format($timestamp, 'iso');
     $brick->text(Date::format($timestamp, $format));
     $brick->addClass($classes);
     return $brick;
 }
開發者ID:papplo,項目名稱:kirby-plugins,代碼行數:8,代碼來源:html5.php

示例2: alert

 public function alert($alert = null)
 {
     if (!is_null($alert)) {
         $this->alert = $alert;
         return $this;
     }
     if (is_null($this->alert)) {
         return null;
     }
     $message = $this->alert;
     $alert = new Brick('div');
     $alert->addClass('message message-is-alert');
     $alert->append(function () use($message) {
         $content = new Brick('span');
         $content->addClass('message-content');
         $content->text($message);
         return $content;
     });
     $alert->append(function () {
         $toggle = new Brick('span');
         $toggle->addClass('message-toggle');
         $toggle->html('<i>&times;</i>');
         return $toggle;
     });
     return $alert;
 }
開發者ID:muten84,項目名稱:luigibifulco.it,代碼行數:26,代碼來源:form.php

示例3: deleteLink

 /**
  * Get a link that allows to delete the comment. Only available to registered
  * users.
  *
  * @return  Brick|string
  */
 public function deleteLink()
 {
     // Ensure the current user is allowed to edit the comment
     if (!$this->exists || !$this->currentUserCan('delete')) {
         return '';
     }
     $uri = $this->page()->uri();
     $hash = $this->page()->hash();
     $id = $this->id();
     $link = new Brick('a');
     $link->attr('href', $this->actionUrl('delete'));
     $link->data('href', $this->actionUrl('delete', true));
     $link->addClass('comment-delete-link js-delete');
     $link->text(l('comments.comment.delete', 'Delete'));
     return $link;
 }
開發者ID:buditanrim,項目名稱:kirby-comments,代碼行數:22,代碼來源:comment.php


注:本文中的Brick::text方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。