Documentation

Taxonomy extends FrontendModelWithChildren
in package
uses WithParentTrait

Taxonomy Model

Table of Contents

Properties

$table_name  : string|null
$translators  : array<string|int, mixed>
$children  : array<string|int, mixed>
$container  : ContainerInterface
$db_row  : Row
$is_first_save  : bool
$keyField  : string|array<string|int, mixed>
$loadedObjects  : array<string|int, mixed>
$pages  : array<string|int, mixed>
$rewriteObj  : Rewrite|null
$websiteModel  : Website|null
$original_data  : array<string|int, mixed>|null

Methods

__call()  : mixed
{@inheritdoc}
__construct()  : mixed
constructor
__get()  : mixed
{@inheritdoc}
__isset()  : bool
{@inheritdoc}
__set()  : void
{@inheritdoc}
__unset()  : void
{@inheritdoc}
checkLoaded()  : self
ensures model is loaded
containerCall()  : mixed
call method through container
containerMake()  : mixed
create object through container
current()  : mixed
{@inheritdoc}
defaultTableName()  : string
gets model table name
delete()  : self
removes model from db
exposeToIndexer()  : array<string|int, string>
Field names to be exposed to indexer
fill()  : self
fills empty model with data
getApp()  : App
gets app object
getAppRouteInfo()  : RouteInfo|null
gets route info
getAppWebsite()  : Website|null
gets current website
getAssets()  : Manager
gets assets manager
getCache()  : Manager
get cache manager
getChangedData()  : array<string|int, mixed>|null
gets model's changed data
getChildren()  : array<string|int, mixed>
gets children
getCollection()  : BaseCollection
getContainer()  : ContainerInterface
gets container object
getContent()  : string
getCreatedAt()  : DateTime
getCrudRouter()  : Crud
gets crud service
getData()  : mixed
gets model's data
getDb()  : Database
gets db object
getDbRow()  : Row
getDebugbar()  : StandardDebugBar
gets debugbar object
getEnv()  : mixed
gets env variable
getEventManager()  : SharedEventEmitter
gets events manager service
getExportHeader()  : array<string|int, mixed>
getExportRowData()  : array<string|int, mixed>
getFrontendUrl()  : string
gets frontend url for object
getGoogleAuthenticator()  : PHPGangsta_GoogleAuthenticator
gets google authenticator service
getGuzzle()  : Client
gets guzzle service
getHtmlRenderer()  : HtmlPartsRenderer
gets html renderer service
getHtmlTitle()  : string
getIcons()  : Icons
gets icons service
getId()  : int
getImagine()  : Imagine
gets imagine service
getIterator()  : Traversable|ArrayIterator
{@inheritdoc}
getKeyField()  : string|array<string|int, mixed>
getKeyFieldValue()  : mixed
getLevel()  : int
getLocale()  : string
getLog()  : Logger
gets log object
getMailer()  : Mailer
gets mailer service
getMetaDescription()  : string
getMetaKeywords()  : string
getOwner()  : User
gets owner
getPages()  : array<string|int, mixed>
gets term pages
getPageTitle()  : string
return page title
getParentId()  : int
getParentIds()  : string|null
gets parent ids tree
getParentObj()  : self|null
gets parent object if any
getPath()  : string
getPdo()  : PDO
gets PDO object
getPosition()  : int
getRedis()  : Manager
gets redis service
getRequest()  : Request
gets current request object
getRewrite()  : Rewrite|null
gets object rewrite model
getRewritePrefix()  : string
{@inheritdoc}
getRouters()  : array<string|int, mixed>
gets routers
getSchema()  : Schema
gets schema object
getSearch()  : Manager
gets search service
getSesMailer()  : SesClient
gets SES mailer service
getSiteData()  : SiteData
gets site data service
getSmtpMailer()  : Swift_Mailer
gets SMTP mailer service
getTableColumns()  : mixed
getTemplateName()  : string
getTemplates()  : Engine
gets plates engine object
getTitle()  : string
getTranslations()  : array<string|int, mixed>
returns object translations urls
getTranslator()  : Translator
gets translator
getUpdatedAt()  : DateTime
getUrl()  : string
getUserId()  : int
getUtils()  : Globals
gets global utils service
getWebhooksRouter()  : Webhooks
gets webhooks service
getWebRouter()  : Web
gets routing service
getWebsite()  : Website
gets website
getWebsiteId()  : int
getZip()  : Zip
gets zip service
hydrateStatementResult()  : array<string|int, mixed>
returns an array of models, starting from a statement Result
isExportable()  : bool
isFirstSave()  : bool
is first save flag
isIndexable()  : bool
isLoaded()  : bool
checks if model is loaded
isNew()  : bool
checks if model is new
key()  : mixed
{@inheritdoc}
load()  : self
loads model by id
loadBy()  : self
loads model by field - value pair
loadByCondition()  : self|null
loads model by condition
new()  : static
gets new empty model
next()  : mixed
{@inheritdoc}
offsetExists()  : bool
{@inheritdoc}
offsetGet()  : mixed
{@inheritdoc}
offsetSet()  : void
{@inheritdoc}
offsetUnset()  : void
{@inheritdoc}
persist()  : self
saves model on db
postLoad()  : self
post load hook
postPersist()  : self
post persist hook
postRemove()  : self
post remove hook
prePersist()  : self
pre persist hook
preRemove()  : BaseModel
pre remove hook
remove()  : self
removes model from db
requestUrl()  : string|bool
executes an http request
reset()  : self
resets model
rewind()  : mixed
{@inheritdoc}
save()  : self
saves model on db
select()  : PDOStatement
basic select statement
setContent()  : self
setCreatedAt()  : self
setData()  : self
sets model's data
setDbRow()  : self
setHtmlTitle()  : self
setId()  : self
setIsFirstSave()  : $this
sets is first save flag
setLevel()  : self
setLocale()  : self
setMetaDescription()  : self
setMetaKeywords()  : self
setParentId()  : self
setPath()  : self
setPosition()  : self
setTableName()  : self
setTemplateName()  : self
setTitle()  : self
setUpdatedAt()  : self
setUrl()  : self
setUserId()  : self
setWebsiteId()  : self
toJson()  : string
gets Model json rapresentation
valid()  : mixed
{@inheritdoc}
cmpPosition()  : int
getModelBasicWhere()  : Result
gets basic where statement for model
getModelName()  : string
gets object model name
getOriginalData()  : mixed
gets model's original data
getService()  : mixed
gets registered service
getTableName()  : string
gets table name
loadedObjectsIdentifier()  : mixed
setOriginalData()  : $this
sets model's original data
sortChildren()  : void
sort children by position
checkDbName()  : self
checks if Row object is from correct table

Properties

$table_name

public string|null $table_name = null

table name

$translators

public static array<string|int, mixed> $translators = []

translators

$container

protected ContainerInterface $container

$is_first_save

protected bool $is_first_save

first save flag

$keyField

protected static string|array<string|int, mixed> $keyField = 'id'

$loadedObjects

protected static array<string|int, mixed> $loadedObjects = []

objects cache

$pages

protected array<string|int, mixed> $pages = []

taxonomy pages

$original_data

private array<string|int, mixed>|null $original_data = null

original model data

Methods

__call()

{@inheritdoc}

public __call(string $name, mixed $arguments) : mixed
Parameters
$name : string
$arguments : mixed
Tags
throws
Exception

__construct()

constructor

public __construct(ContainerInterface $container[, Row|null $db_row = null ]) : mixed
Parameters
$container : ContainerInterface
$db_row : Row|null = null
Tags
throws
InvalidValueException
throws
BasicException

__get()

{@inheritdoc}

public __get(mixed $key) : mixed
Parameters
$key : mixed

__isset()

{@inheritdoc}

public __isset(mixed $name) : bool
Parameters
$name : mixed
Return values
bool

__set()

{@inheritdoc}

public __set(mixed $key, mixed $value) : void
Parameters
$key : mixed
$value : mixed

__unset()

{@inheritdoc}

public __unset(mixed $name) : void
Parameters
$name : mixed

checkLoaded()

ensures model is loaded

public checkLoaded() : self
Tags
throws
Exception
Return values
self

containerCall()

call method through container

public containerCall(callable $callable[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$callable : callable
$arguments : array<string|int, mixed> = []

containerMake()

create object through container

public containerMake(string $className[, array<string|int, mixed> $arguments = [] ]) : mixed
Parameters
$className : string
$arguments : array<string|int, mixed> = []

current()

{@inheritdoc}

public current() : mixed

defaultTableName()

gets model table name

public static defaultTableName() : string
Return values
string

delete()

removes model from db

public delete() : self
Tags
throws
BasicException
Return values
self

exposeToIndexer()

Field names to be exposed to indexer

public static exposeToIndexer() : array<string|int, string>
Return values
array<string|int, string>

fill()

fills empty model with data

public fill(int|Row $id) : self
Parameters
$id : int|Row
Tags
throws
InvalidValueException
throws
BasicException
Return values
self

getChangedData()

gets model's changed data

public getChangedData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getChildren()

gets children

public getChildren([string|null $locale = null ][, bool $reset = false ]) : array<string|int, mixed>
Parameters
$locale : string|null = null
$reset : bool = false
Return values
array<string|int, mixed>

getContainer()

gets container object

public getContainer() : ContainerInterface
Return values
ContainerInterface

getContent()

public getContent() : string
Return values
string

getCreatedAt()

public getCreatedAt() : DateTime
Return values
DateTime

getData()

gets model's data

public getData([null $column = null ]) : mixed
Parameters
$column : null = null

getDb()

gets db object

public getDb() : Database
Tags
throws
BasicException
Return values
Database

getDbRow()

public getDbRow() : Row
Return values
Row

database row

getDebugbar()

gets debugbar object

public getDebugbar() : StandardDebugBar
Tags
throws
BasicException
Return values
StandardDebugBar

getEnv()

gets env variable

public getEnv(string $variable[, mixed $default = null ]) : mixed
Parameters
$variable : string
$default : mixed = null
Tags
throws
BasicException

getEventManager()

gets events manager service

public getEventManager() : SharedEventEmitter
Tags
throws
BasicException
Return values
SharedEventEmitter

getExportHeader()

public static getExportHeader() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExportRowData()

public getExportRowData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFrontendUrl()

gets frontend url for object

public getFrontendUrl() : string
Tags
throws
Exception
Return values
string

getGoogleAuthenticator()

gets google authenticator service

public getGoogleAuthenticator() : PHPGangsta_GoogleAuthenticator
Tags
throws
BasicException
Return values
PHPGangsta_GoogleAuthenticator

getGuzzle()

gets guzzle service

public getGuzzle() : Client
Tags
throws
BasicException
Return values
Client

getHtmlTitle()

public getHtmlTitle() : string
Return values
string

getIcons()

gets icons service

public getIcons() : Icons
Tags
throws
BasicException
Return values
Icons

getId()

public getId() : int
Return values
int

getImagine()

gets imagine service

public getImagine() : Imagine
Tags
throws
BasicException
Return values
Imagine

getIterator()

{@inheritdoc}

public getIterator() : Traversable|ArrayIterator
Return values
Traversable|ArrayIterator

getKeyField()

public static getKeyField() : string|array<string|int, mixed>
Return values
string|array<string|int, mixed>

getKeyFieldValue()

public getKeyFieldValue() : mixed

getLevel()

public getLevel() : int
Return values
int

getLocale()

public getLocale() : string
Return values
string

getLog()

gets log object

public getLog() : Logger
Tags
throws
BasicException
Return values
Logger

getMetaDescription()

public getMetaDescription() : string
Return values
string

getMetaKeywords()

public getMetaKeywords() : string
Return values
string

getOwner()

gets owner

public getOwner() : User
Tags
throws
DependencyException
throws
NotFoundException
Return values
User

getPages()

gets term pages

public getPages([false $reset = false ]) : array<string|int, mixed>
Parameters
$reset : false = false
Tags
throws
Exception
Return values
array<string|int, mixed>

getPageTitle()

return page title

public getPageTitle() : string
Return values
string

getParentId()

public getParentId() : int
Return values
int

getParentIds()

gets parent ids tree

public getParentIds() : string|null
Return values
string|null

getParentObj()

gets parent object if any

public getParentObj() : self|null
Return values
self|null

getPath()

public getPath() : string
Return values
string

getPdo()

gets PDO object

public getPdo() : PDO
Tags
throws
BasicException
Return values
PDO

getPosition()

public getPosition() : int
Return values
int

getRequest()

gets current request object

public getRequest() : Request
Tags
throws
BasicException
Return values
Request

getRewritePrefix()

{@inheritdoc}

public getRewritePrefix() : string
Return values
string

getRouters()

gets routers

public getRouters() : array<string|int, mixed>
Tags
throws
BasicException
Return values
array<string|int, mixed>

getSchema()

gets schema object

public getSchema() : Schema
Tags
throws
BasicException
Return values
Schema

getSesMailer()

gets SES mailer service

public getSesMailer() : SesClient
Tags
throws
BasicException
Return values
SesClient

getSmtpMailer()

gets SMTP mailer service

public getSmtpMailer() : Swift_Mailer
Tags
throws
BasicException
Return values
Swift_Mailer

getTableColumns()

public static getTableColumns([ContainerInterface|null $container = null ]) : mixed
Parameters
$container : ContainerInterface|null = null

getTemplateName()

public getTemplateName() : string
Return values
string

getTemplates()

gets plates engine object

public getTemplates() : Engine
Tags
throws
BasicException
Return values
Engine

getTitle()

public getTitle() : string
Return values
string

getTranslations()

returns object translations urls

public getTranslations() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

getTranslator()

gets translator

public getTranslator([string|null $locale_code = null ]) : Translator
Parameters
$locale_code : string|null = null
Tags
throws
DependencyException
throws
NotFoundException
Return values
Translator

getUpdatedAt()

public getUpdatedAt() : DateTime
Return values
DateTime

getUrl()

public getUrl() : string
Return values
string

getUserId()

public getUserId() : int
Return values
int

getWebsiteId()

public getWebsiteId() : int
Return values
int

hydrateStatementResult()

returns an array of models, starting from a statement Result

public static hydrateStatementResult(Result $stmt) : array<string|int, mixed>
Parameters
$stmt : Result
Tags
throws
DependencyException
throws
NotFoundException
Return values
array<string|int, mixed>

isExportable()

public static isExportable() : bool
Return values
bool

isFirstSave()

is first save flag

public isFirstSave() : bool
Return values
bool

isIndexable()

public static isIndexable() : bool
Return values
bool

isLoaded()

checks if model is loaded

public isLoaded() : bool
Return values
bool

isNew()

checks if model is new

public isNew() : bool
Return values
bool

load()

loads model by id

public static load(int $id[, bool $reset = false ]) : self
Parameters
$id : int
$reset : bool = false
Return values
self

loadBy()

loads model by field - value pair

public static loadBy(string $field, mixed $value) : self
Parameters
$field : string
$value : mixed
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
Return values
self

loadByCondition()

loads model by condition

public static loadByCondition(array<string|int, mixed> $condition) : self|null
Parameters
$condition : array<string|int, mixed>
Tags
throws
BasicException
throws
DependencyException
throws
NotFoundException
Return values
self|null

new()

gets new empty model

public static new([array<string|int, mixed> $initial_data = [] ]) : static
Parameters
$initial_data : array<string|int, mixed> = []
Tags
throws
InvalidValueException
throws
BasicException
Return values
static

offsetExists()

{@inheritdoc}

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

{@inheritdoc}

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

offsetSet()

{@inheritdoc}

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed

offsetUnset()

{@inheritdoc}

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

persist()

saves model on db

public persist([bool $recursive = true ]) : self
Parameters
$recursive : bool = true
Return values
self

postLoad()

post load hook

public postLoad() : self
Return values
self

postPersist()

post persist hook

public postPersist() : self
Tags
throws
Exception
Return values
self

postRemove()

post remove hook

public postRemove() : self
Return values
self

prePersist()

pre persist hook

public prePersist() : self
Return values
self

remove()

removes model from db

public remove() : self
Tags
throws
BasicException
Return values
self

requestUrl()

executes an http request

public requestUrl(string $url[, string $method = 'GET' ][, array<string|int, mixed> $options = [] ]) : string|bool
Parameters
$url : string
$method : string = 'GET'
$options : array<string|int, mixed> = []
Tags
throws
Exception
throws
GuzzleException
Return values
string|bool

reset()

resets model

public reset() : self
Tags
throws
BasicException
Return values
self

rewind()

{@inheritdoc}

public rewind() : mixed

save()

saves model on db

public save() : self
Tags
throws
BasicException
Return values
self

select()

basic select statement

public static select([array<string|int, mixed> $options = [] ]) : PDOStatement
Parameters
$options : array<string|int, mixed> = []
Return values
PDOStatement

setContent()

public setContent(string $content) : self
Parameters
$content : string
Return values
self

setCreatedAt()

public setCreatedAt(DateTime $created_at) : self
Parameters
$created_at : DateTime
Return values
self

setData()

sets model's data

public setData(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

setDbRow()

public setDbRow(mixed $db_row) : self
Parameters
$db_row : mixed
Return values
self

setHtmlTitle()

public setHtmlTitle(string $html_title) : self
Parameters
$html_title : string
Return values
self

setId()

public setId(int $id) : self
Parameters
$id : int
Return values
self

setIsFirstSave()

sets is first save flag

public setIsFirstSave(mixed $is_first_save) : $this
Parameters
$is_first_save : mixed
Return values
$this

setLevel()

public setLevel(int $level) : self
Parameters
$level : int
Return values
self

setLocale()

public setLocale(string $locale) : self
Parameters
$locale : string
Return values
self

setMetaDescription()

public setMetaDescription(string $meta_description) : self
Parameters
$meta_description : string
Return values
self

setMetaKeywords()

public setMetaKeywords(string $met_keywords) : self
Parameters
$met_keywords : string
Return values
self

setParentId()

public setParentId(int $parent) : self
Parameters
$parent : int
Return values
self

setPath()

public setPath(string $path) : self
Parameters
$path : string
Return values
self

setPosition()

public setPosition(int $position) : self
Parameters
$position : int
Return values
self

setTableName()

public setTableName(mixed $table_name) : self
Parameters
$table_name : mixed
Return values
self

setTemplateName()

public setTemplateName(string $template_name) : self
Parameters
$template_name : string
Return values
self

setTitle()

public setTitle(string $title) : self
Parameters
$title : string
Return values
self

setUpdatedAt()

public setUpdatedAt(DateTime $updated_at) : self
Parameters
$updated_at : DateTime
Return values
self

setUrl()

public setUrl(string $url) : self
Parameters
$url : string
Return values
self

setUserId()

public setUserId(int $user_id) : self
Parameters
$user_id : int
Return values
self

setWebsiteId()

public setWebsiteId(int $website_id) : self
Parameters
$website_id : int
Return values
self

toJson()

gets Model json rapresentation

public toJson([int $level = 0 ]) : string
Parameters
$level : int = 0

internally used

Return values
string

valid()

{@inheritdoc}

public valid() : mixed

getModelBasicWhere()

gets basic where statement for model

protected static getModelBasicWhere([array<string|int, mixed> $condition = [] ][, array<string|int, mixed> $order = [] ]) : Result
Parameters
$condition : array<string|int, mixed> = []
$order : array<string|int, mixed> = []
Return values
Result

getModelName()

gets object model name

protected getModelName() : string
Return values
string

getOriginalData()

gets model's original data

protected getOriginalData([null $key = null ]) : mixed
Parameters
$key : null = null

getService()

gets registered service

protected getService(string $service_key) : mixed
Parameters
$service_key : string
Tags
throws
BasicException

getTableName()

gets table name

protected getTableName() : string
Return values
string

loadedObjectsIdentifier()

protected static loadedObjectsIdentifier(mixed $id) : mixed
Parameters
$id : mixed

setOriginalData()

sets model's original data

protected setOriginalData(array<string|int, mixed>|null $original_data) : $this
Parameters
$original_data : array<string|int, mixed>|null
Return values
$this

checkDbName()

checks if Row object is from correct table

private checkDbName(Row $db_row) : self
Parameters
$db_row : Row
Tags
throws
InvalidValueException
Return values
self

        
On this page

Search results