Symbiote\MicroBlog\Model\MicroPost
- Author: marcus@symbiote.com.au
- License: BSD License http://silverstripe.org/bsd-license/
Synopsis
class MicroPost
extends DataObject
{
- // members
- private static string $table_name = 'MicroPost';
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $many_many = ;
- private static array $defaults = ;
- private static array $indexes = ;
- private static array $extensions = ;
- private static array $summary_fields = ;
- private static array $searchable_fields = ;
- private static string $default_sort = 'ID DESC';
- private static boolean $soft_delete = false;
- public boolean $oembedDetect = true;
- public SocialGraphService $socialGraphService;
- public MicroBlogService $microBlogService;
- public SyncrotronService $syncrotronService;
- private boolean $afterWriteRender = false;
- // methods
- public void getCMSFields()
- public void onBeforeWrite()
- public void onAfterWrite()
- public void toFilteredMap()
- public void giveAccessTo()
- public boolean isUnreadByUser()
- public void isEdited()
- public string PostSummary()
- public string PostTitle()
- public string ConvertedContent()
- public static void handle_video()
- public void getPostTarget()
- public boolean currentContext()
- public void mentionedMembers()
- public string hasOwnTableDatabaseField()
- public boolean IsImage()
- public void analyseContent()
- public void tag()
- public ArrayList currentVotesByUser()
- public void delete()
- public void canView()
- public void canEdit()
- public void canAddChildren()
- public void formattedPost()
- public void Link()
- public void ThreadLink()
- public void AbsoluteThreadLink()
- public void AbsoluteLink()
- public ArrayList Posts()
- public void permissionSource()
- public array getRecipients()
- public void updateSearchableData()
- public array getAvailableKeywords()
- public array getNotificationTemplateData()
- public void forSyncro()
- public void fromSyncro()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $afterWriteRender
- $db
- $default_sort
- $defaults
- $extensions
- $has_many
- $has_one
- $indexes
- $many_many
- $searchable_fields
- $soft_delete
—
boolean
Should deletes be complete from the DB or just a 'soft' delete that has things filtered instead? - $summary_fields
- $table_name
public
- $microBlogService — Symbiote\MicroBlog\Model\MicroBlogService
- $oembedDetect
—
boolean
Do we automatically detect oembed data and change comments? - $syncrotronService — Symbiote\MicroBlog\Model\SyncrotronService
Methods
public
- AbsoluteLink()
- AbsoluteThreadLink()
- ConvertedContent() — Get the content of this post with hash-tags converted to links
- IsImage() — Is this post an image?
- Link()
- PostSummary() — Get a summary of the post
- PostTitle() — Returns the title of this post (trimmed down in length for sanity)
- Posts() — Gets all the replies to this post
- ThreadLink()
- analyseContent() — Check contents of the post for things like tags, user references, external references etc.
- canAddChildren() — handles SiteTree::canAddChildren, useful for other types too
- canEdit()
- canView()
- currentContext() — Whether the current context is that of the post target.
- currentVotesByUser() — Gets the list of current votes on this object by the current user
- delete() — When 'deleting' an object, we actually just remove all its content
- forSyncro()
- formattedPost()
- fromSyncro()
- getAvailableKeywords() — Return a list of available keywords in the format array('keyword' => 'A description') to help users format notification fields
- getCMSFields()
- getNotificationTemplateData() — Gets an associative array of data that can be accessed in notification fields and templates
- getPostTarget()
- getRecipients() — Get a list of all the members who should receive notifications based on the notificationType variable
- giveAccessTo() — Gives access to this micropost, based on information in the $to array
- handle_video()
- hasOwnTableDatabaseField() — Handle the wilson rating specially
- isEdited() — has this post been edited? return 'true' if the diff between created and last edited is greater than a 'grace' period.
- isUnreadByUser() — Has this post been read by the given user?
- mentionedMembers() — Get the list of members mentioned in this post
- onAfterWrite()
- onBeforeWrite()
- permissionSource() — We need to define a permission source to ensure the ParentID isn't used for permission inheritance
- tag() — Tag this post with a particular tag
- toFilteredMap()
- updateSearchableData() — Update the list of fields that are indexed for a microblog post