Back to What's Going on

    Object variables
    filterFields() method Limit visibility of the published-button
    afterValidate() method
    beforeSave() method
    setUrl() method Sets the "url" attribute with a URL to this object
    canEdit() method Used to test if a certain user has permission to edit post, returns TRUE if the user is the owner or has other posts access.
    formatHtml() method
    scopeIsPublished() method
    scopeListFrontEnd() method Lists posts for the front end
    scopeFilterCategories() method Allows filtering for specifc categories
    getHasSummaryAttribute() method Used by "has_summary", returns true if this post uses a summary (more tag)
    getSummaryAttribute() method Used by "summary", if no excerpt is provided, generate one from the content. Returns the HTML content before the tag or a limited 600 character version.
    scopeApplySibling() method Apply a constraint to the query to find the nearest sibling // Get the next post Post::applySibling()->first(); // Get the previous post Post::applySibling(-1)->first(); // Get the previous post, ordered by the ID attribute instead Post::applySibling(['direction' => -1, 'attribute' => 'id'])->first();
    nextPost() method Returns the next post, if available.
    previousPost() method Returns the previous post, if available.
    getMenuTypeInfo() method Handler for the pages.menuitem.getTypeInfo event. Returns a menu item type information. The type information is returned as array with the following elements: - references - a list of the item type reference options. The options are returned in the ["key"] => "title" format for options that don't have sub-options, and in the format ["key"] => ["title"=>"Option title", "items"=>[...]] for options that have sub-options. Optional, required only if the menu item type requires references. - nesting - Boolean value indicating whether the item type supports nested items. Optional, false if omitted. - dynamicItems - Boolean value indicating whether the item type could generate new menu items. Optional, false if omitted. - cmsPages - a list of CMS pages (objects of the Cms\Classes\Page class), if the item type requires a CMS page reference to resolve the item URL.
    resolveMenuItem() method Handler for the pages.menuitem.resolveItem event. Returns information about a menu item. The result is an array with the following keys: - url - the menu item URL. Not required for menu item types that return all available records. The URL should be returned relative to the website root and include the subdirectory, if any. Use the Url::to() helper to generate the URLs. - isActive - determines whether the menu item is active. Not required for menu item types that return all available records. - items - an array of arrays with the same keys (url, isActive, items) + the title key. The items array should be added only if the $item's $nesting property value is TRUE.
    bootValidation() method Boot the validation trait for this model.
    forceSave() method Force save the model even if validation fails.
    validate() method Validate the model instance
    isAttributeRequired() method Determines if an attribute is required based on the validation rules.
    errors() method Get validation error message collection for the Model
    validating() method Create a new native event for handling beforeValidate().
    validated() method Create a new native event for handling afterValidate().
    table string
    implement array(1)
    array:1 [
      0 => "@RainLab.Translate.Behaviors.TranslatableModel"
    rules array(4)
    array:4 [
      "title" => "required"
      "slug" => array:3 [
        0 => "required"
        1 => "regex:/^[a-z0-9\/\:_\-\*\[\]\+\?\|]*$/i"
        2 => "unique:rainlab_blog_posts"
      "content" => "required"
      "excerpt" => ""
    translatable array(5)
    array:5 [
      0 => "title"
      1 => "content"
      2 => "content_html"
      3 => "excerpt"
      4 => array:2 [
        0 => "slug"
        "index" => true
    belongsTo array(1)
    array:1 [
      "user" => array:1 [
        0 => "Backend\Models\User"
    belongsToMany array(1)
    array:1 [
      "categories" => array:3 [
        0 => "RainLab\Blog\Models\Category"
        "table" => "rainlab_blog_posts_categories"
        "order" => "name"
    attachMany array(2)
    array:2 [
      "featured_images" => array:2 [
        0 => "System\Models\File"
        "order" => "sort_order"
      "content_images" => array:1 [
        0 => "System\Models\File"
    preview NULL
  • Important Information about School Records

    Update on the treatment of personal data

    Learn more >