当前位置: 首页>>代码示例>>PHP>>正文


PHP Content::getTitle方法代码示例

本文整理汇总了PHP中Content::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Content::getTitle方法的具体用法?PHP Content::getTitle怎么用?PHP Content::getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Content的用法示例。


在下文中一共展示了Content::getTitle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: doInsert

 protected function doInsert(Content $content)
 {
     $now = time();
     $query = "INSERT INTO albums " . "(slug, title, datecreated, datemodified, status, datedisplayed, newsid, eventid, featuredimageid) " . "VALUES " . "('{$content->getSlug()}','{$content->getTitle()}','{$now}','{$now}','{$content->getStatus()}','{$content->getDateDisplayed()}','{$content->getNewsId()}','{$content->getEventId()}','{$content->getFeaturedImageId()}')";
     self::$mysqli->query($query);
     $content->setId(self::$mysqli->insert_id);
 }
开发者ID:awotherspoon-score,项目名称:IC,代码行数:7,代码来源:albummapper.php

示例2: doInsert

 protected function doInsert(Content $object)
 {
     $now = time();
     $query = "INSERT INTO newsevents " . "(status, slug, title, datecreated, datemodified, text, description, keywords, datedisplayed, type) " . "VALUES " . "('{$object->getStatus()}', '{$object->getSlug()}','{$object->getTitle()}', '{$now}','{$now}','{$object->getText()}','{$object->getDescription()}','{$object->getKeywords()}','{$object->getDateDisplayed()}','{$object->getContentType()}')";
     //echo $query;
     self::$mysqli->query($query);
     $object->setId(self::$mysqli->insert_id);
 }
开发者ID:awotherspoon-score,项目名称:IC,代码行数:8,代码来源:newseventmapper.php

示例3: title

/**
 * Returns the title of the current page.
 * 
 * @package Theme
 * @return string The title. 
 */
function title()
{
    return Content::getTitle();
}
开发者ID:alecgorge,项目名称:TopHat,代码行数:10,代码来源:cc-themes.php

示例4: update

 public function update(Content $image)
 {
     $now = time();
     $query = "UPDATE images SET " . "slug='{$image->getSlug()}', " . "title='{$image->getTitle()}', " . "datemodified='{$now}', " . "albumid='{$image->getAlbumId()}', " . "filename='{$image->getFileName()}', " . "status='" . Content::STATUS_LIVE . "', " . "prospective='{$image->getProspective()}', " . "current='{$image->getCurrent()}', " . "staff='{$image->getStaff()}' " . "WHERE id={$image->getId()}";
     self::$mysqli->query($query);
 }
开发者ID:awotherspoon-score,项目名称:IC,代码行数:6,代码来源:imagemapper.php

示例5: setContent

    function setContent($content_body)
    {
        $this->content_body = htmlentities("{$content_body}");
    }
    function getContent()
    {
        return $this->content_body;
    }
}
/* Test Id */
$content = new Content();
$content->setID();
$content->setID();
$content->setID();
$content->setID();
$content->setID();
$content->setID() . '<br/>';
$content->setAuthor('Guillermina', 'Gonjon') . '<br/>';
$content->setTitle("this is my title") . '<br/>';
$content->setContent("This is an example of what this page can do.  This is my content for this page.");
echo $content->getAuthor() . '<br/>';
echo $content->getDate() . '<br/>';
echo $content->getTitle() . '<br/>';
echo $content->getContent() . '<br/>';
$theid = $content->content_id;
echo $content->formatID($theid) . '<br/>';
var_dump($content);
//echo $content->formatted_id.'<br/>';
$output = shell_exec('cal 2016 | grep 2016') . '<br/>';
//echo "<pre>$output</pre>";
//echo "<br>".phpversion().'<br/>';
开发者ID:gmanon,项目名称:contributions,代码行数:31,代码来源:Content.class.php

示例6: updateSlug

 /**
  * Double checks a content slug after a potential title change
  *
  * If the title hasn't changed then return. Else generate a new slug
  * This requires requires n runs to the database, where n is the number of duplicate slugs
  * TODO: Optimize this so we need at most one trip to the database, hint: use LIKE '$newSlug%;
  *
  * @param $content Content the content object who's slug we need to update
  */
 protected function updateSlug(Content $content)
 {
     $oldSlug = $content->getSlug();
     $newSlug = $this->generateSlug($content->getTitle());
     if ($oldSlug == $newSlug) {
         return;
     }
     $suffix = '';
     while ($this->findBySlug($newSlug . $suffix) !== null) {
         if ($suffix == '') {
             $suffix = 1;
         }
         $suffix++;
     }
     $content->setSlug($newSlug . $suffix);
 }
开发者ID:awotherspoon-score,项目名称:IC,代码行数:25,代码来源:contentmapper.php


注:本文中的Content::getTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。