Skip to content

Model: Blog

Ricky edited this page Jul 30, 2020 · 3 revisions

Namespace: rbwebdesigns\HamletCMS\Blog

Public properties

These are the public properties of the Blog class.

Property Datatype Notes
id int Primary key
name string Blog name
description text Blog description
domain string Custom domain name
user_id date Author ID
anon_search boolean Is the blog allowed to be included in an anonymous users search results
visibility string Access level to the blog, not really implemented! Proposed options are: Anon, members, friends or private
category string Category name
logo string Filename for the blog logo
icon string Filename for the blog icon

Public methods

These are the public methods of the Blog class.

Signature Return type Notes
relativePath() string Useful for outputing relative URL path to the blog
url() string Relative URL path to the blog, or absolute if using custom domain
resourcePath() string Useful for outputing URL path for blog assets (CSS, JS, images)
contributors() \rbwebdesigns\HamletCMS\User[] List of contributors
isContributor() boolean Is the current user a contributor to the blog
posts() \rbwebdesigns\HamletCMS\BlogPosts\Post[] All published(?) posts
latestPost() \rbwebdesigns\HamletCMS\BlogPosts\Post The last published post
config() array Get blog config
updateConfig(array $newConfig) boolean Save blog config