Esempio n. 1
0
 public static function updateFrequency($oldTags, $newTags)
 {
     $oldTags = \Helpers\TextHelper::string2array($oldTags);
     $newTags = \Helpers\TextHelper::string2array($newTags);
     self::addTags(array_values(array_diff($newTags, $oldTags)));
     self::removeTags(array_values(array_diff($oldTags, $newTags)));
 }
Esempio n. 2
0
 /**
  * @return array a list of links that point to the post list filtered by every tag of this post
  */
 public function getTagLinks()
 {
     $links = array();
     foreach (\Helpers\TextHelper::string2array($this->tags) as $tag) {
         $links[] = \Phalcon\Tag::linkTo('posts/index?tags=' . $tag, $tag);
     }
     return $links;
 }