/** * Read in the description from this object. * Descendents can decide which description (HTML or plain text) to use based * on the {@link $html} flag or other properties. * @param CONTENT_OBJECT $obj */ public function set_description_from($obj) { switch ($this->article_format) { case Newsfeed_content_html: case Newsfeed_content_full_html: $this->description = $obj->description_as_html(); break; case Newsfeed_content_text: $this->description = $obj->description_as_plain_text(); break; } }
/** * Read in the description from this object. * RSS always uses plain text for descriptions (HTML is not allowed). * @param CONTENT_OBJECT $obj */ public function set_description_from($obj) { $this->description = $obj->description_as_plain_text(); }