ModelRewrites module

Rewrite

A model in the Rewrites module, with 15 members for templates, 18 API properties and 21 members for admin templates.

Rewrites\Models\Frontend\Rewrite Rewrites\Models\Api\Rewrite Rewrites\Models\Backend\Rewrite
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 15

Take no arguments.

# getId()
?int
# getPosition()
?int
# getSource()
?string
# getTarget()
?string
# getMatchType()
?string
# getAction()
?string
# getRedirectCode()
?int
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getPublished()
?DateTime
# getSite()
?Site
# isPublished()
bool
Check if the record is published.
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 18

Read-only values on the record.

# editUrl Not in Templates
?string
Get the url for editing the record.
# moveUrl Not in Templates
?string
Get the url for moving the record.
# deleteUrl Not in Templates
?string
Get the url for deleting the record.
# publishUrl Not in Templates
?string
Get the url for publishing the record.
# manageUrl Not in Templates
?string
Get the url for managing records.
# id
?int
# position
?int
# source
?string
# target
?string
# matchType
?string
# action
?string
# redirectCode
?int
# created
?DateTime
Get the date the record was created.
# modified
?DateTime
Get the last modification date for the record.
# published
?DateTime
# site
?Site
# published
bool
Check if the record is published.

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 21

Take no arguments.

# getEditUrl() Not in Templates
?string
Get the url for editing the record.
# getMoveUrl() Not in Templates
?string
Get the url for moving the record.
# getDeleteUrl() Not in Templates
?string
Get the url for deleting the record.
# getPublishUrl() Not in Templates
?string
Get the url for publishing the record.
# getManageUrl() Not in Templates
?string
Get the url for managing records.
# getId()
?int
# getPosition()
?int
# getSource()
?string
# getTarget()
?string
# getMatchType()
?string
# getAction()
?string
# getRedirectCode()
?int
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getPublished()
?DateTime
# getSite()
?Site
# isPublished()
bool
Check if the record is published.
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned