Property | Type | Description | |
---|---|---|---|
$images | array |
Method | Description | |
---|---|---|
__construct ( Silex\Application $app ) | ||
deleteContent ( string $contenttype, integer $id ) : integer | Delete a record. | |
depublishExpiredRecords ( ) | ||
getContent ( string $textquery, string $parameters = '', array &$pager = [], array $whereparameters = [] ) : array | getContent based on a 'human readable query'. | |
getContentByTaxonomy ( string $taxonomyslug, string $name, string $parameters = [] ) : array | Retrieve content from the database, filtered on taxonomy. | |
getContentObject ( array | string $contenttype, array $values = [] ) : |
Get an object for the content of a specific contenttype. This will be \Bolt\Legacy\Content, unless the contenttype defined another class to be used. | |
getContentType ( string $contenttypeslug ) : boolean | array | Get the contenttype as an array, based on the given $contenttypeslug. | |
getContentTypeFieldType ( string $contenttypeslug, string $fieldname ) : array | Get the fieldtype for a given contenttype and fieldname. | |
getContentTypeFields ( string $contenttypeslug ) : array | Get an array of the available fields for a given contenttype. | |
getContentTypeGrouping ( string $contenttypeslug ) : mixed | Check if a given contenttype has a grouping, and if it does, return it. | |
getContentTypeTaxonomy ( string $contenttypeslug ) : array | Get an array of the available taxonomytypes for a given contenttype. | |
getContentTypes ( ) : array | Get an array of the available contenttypes. | |
getContenttypeTablename ( string | array $contenttype ) : string | Get the tablename with prefix from a given Contenttype. | |
getEmptyContent ( $contenttypeslug ) | ||
getLatestId ( $contenttypeslug ) | ||
getPager ( string $name = null ) : array | Getter of a pager element. Pager can hold a paging snapshot map. | |
getRepeaters ( $content ) | ||
getSortOrder ( string $name = '-datepublish' ) : string | Get sorting order of name, stripping possible " DESC" " ASC" etc., and also return the sorting order. | |
getTablename ( string $name ) : string | Get the table name with prefix from a given $name. | |
getTaxonomyType ( string $taxonomyslug ) : boolean | array | Get the taxonomy as an array, based on the given $taxonomyslug. | |
getUri ( string $title, integer $id, string $contenttypeslug = "", boolean $fulluri = true, boolean $allowempty = true, boolean $slugfield = 'slug' ) : string | Get a unique URL for a record | |
isEmptyPager ( ) : boolean | ||
preFill ( array $contenttypes = [] ) : string | Add some records with dummy content. | |
publishTimedRecords ( ) | ||
saveContent ( |
Save a record. | |
searchAllContentTypes ( array $parameters = [], &$pager = [] ) | ||
searchContent ( string $q, array $contenttypes = null, array $filters = null, integer $limit = 9999, integer $offset ) : mixed | Search through actual content. | |
searchContentType ( $contenttypename, array $parameters = [], &$pager = [] ) | ||
setPager ( string $name, array | Bolt\Pager $pager ) : |
Setter for pager storage element. | |
updateSingleValue ( string $contenttype, integer $id, string $field, mixed $value ) : boolean | Update a single value from content. |
Method | Description | |
---|---|---|
decodePageParameter ( string $context = '', array $inParameters = null ) : mixed | Decodes contextual page number from current request url if found. | |
executeGetContentQueries ( array $decoded ) : array | Execute the content queries. | |
executeGetContentSearch ( array $decoded, array $parameters ) : array | Execute the content queries. | |
findContent ( string $tablename, integer $contentId ) : array | Find record from Content Type and Content Id. | |
getOrderBys ( $order ) : array | Get the ORDER BY parameters for the query. | |
getRelation ( array $content ) : array | Get the relations for one or more units of content, return the array with the taxonomy attached. | |
getTaxonomy ( |
Get the taxonomy for one or more units of content, return the array with the taxonomy attached. | |
hasRecords ( $tablename ) | ||
insertContent ( |
Insert a new contenttype record in the database. | |
isMultiOrderQuery ( $order ) : boolean | Check if this query has multiple ORDER BY parameters. | |
isNotLastItemInArray ( $totalOrderByElements, $index ) : boolean | Check if this is the last element in the array. | |
tableExists ( $name ) : boolean | Check if the table $name exists. We use our own queries here, because it's _much_ faster than Doctrine's getSchemaManager(). | |
updateRelation ( string $contenttype, integer $contentId, array $relation ) | Update / insert relation for a given content-unit. | |
updateTaxonomy ( string $contenttype, integer $contentId, array $taxonomy ) | Update / insert taxonomy for a given content-unit. |
Method | Description | |
---|---|---|
compareSearchWeights ( |
Compare by search weights. | |
decodeContentQuery ( string $textquery, array $inParameters = null ) : array | Decode a content textquery | |
decodeContentTypesFromText ( string $text ) : array | Decode a contenttypes argument from text. | |
decodeQueryOrder ( array $contenttype, string $orderValue ) : string | Get the parameter for the 'order by' part of a query. | |
decodeSearchQuery ( $q ) | Decode search query into searchable parts. | |
getBlocksTitle ( ) : string | Get the title for a 'Block' contenttype. Check if the desired ones aren't present in the database yet, and return them in order. | |
getEscapedSortorder ( string $name, string $prefix = 'r' ) : string | Get an escaped sortorder for use in SQL, from a fieldname like 'title' or '-id'. | |
getFieldName ( string $name ) : string | Get field name, stripping possible " DESC" " ASC" etc. | |
getSomeRandomTags ( integer $num = 5 ) : string[] | Get an array of random tags | |
getValidSaveData ( array $fieldvalues, array $contenttype ) : array | Get a valid array to commit. | |
groupingSort ( |
Helper function for sorting Records of content that have a Grouping. | |
hydrateRows ( array | string $contenttype, array $rows, boolean $getTaxoAndRel = true ) : array | Hydrate database rows into objects. | |
isValidColumn ( string $name, array $contenttype, boolean $allowVariants = false ) : boolean | Check if a given name is a valid column, and if it can be used in queries. | |
logDelete ( string $contenttype, integer $contentid, array $content, string $comment = null ) | Writes a content-changelog entry for a deleted entry. | |
logInsert ( string $contenttype, integer $contentid, array $content, string $comment = null ) | Writes a content-changelog entry for a newly-created entry. | |
logUpdate ( string $contenttype, integer $contentid, array $newContent, array $oldContent = null, string $comment = null ) | Writes a content-changelog entry for an updated entry. | |
organizeQueryParameters ( array | string | null $inParameters = null ) : array | Split into meta-parameters and contenttype parameters. | |
parseTextQuery ( $textquery, array &$decoded, array &$metaParameters, array &$ctypeParameters ) | Parse textquery into useable arguments. | |
parseWhereParameter ( string $key, string $value, mixed $fieldtype = false ) : string | Helper function to set the proper 'where' parameter, when getting values like '<2012' or '!bob'. | |
preFillSingle ( string $key, array $contenttype, array $images ) : string | Add a record with dummy content. | |
prepareDecodedQueryForUse ( &$decoded, &$metaParameters, &$ctypeParameters ) | Prepare decoded for actual use. | |
runContentTypeTableChecks ( array $contenttypes ) : boolean | Check for the existence of ContentType tables. | |
searchSingleContentType ( $query, $contenttype, $fields, array $filter = null, boolean $implode = false ) : |
Search through a single contenttype. | |
updateContent ( |
Update a Bolt contenttype record. |
protected executeGetContentQueries ( array $decoded ) : array | ||
$decoded | array | |
return | array |
public getContentTypeFields ( string $contenttypeslug ) : array | ||
$contenttypeslug | string | |
return | array | $fields |
public getContentTypeGrouping ( string $contenttypeslug ) : mixed | ||
$contenttypeslug | string | |
return | mixed | $grouping |
public getContentTypeTaxonomy ( string $contenttypeslug ) : array | ||
$contenttypeslug | string | |
return | array | $taxonomy |
public getContentTypes ( ) : array | ||
return | array | $contenttypes |
protected getOrderBys ( $order ) : array | ||
$order | ||
return | array |
protected getRelation ( array $content ) : array | ||
$content | array | |
return | array | $content |
public getSortOrder ( string $name = '-datepublish' ) : string | ||
$name | string | |
return | string |
public getTablename ( string $name ) : string | ||
$name | string | |
return | string |
protected getTaxonomy ( |
||
$content | ||
return | array | $content |
protected insertContent ( |
||
$content | Record content to insert | |
$comment | string | Editor's comment |
return | boolean |
protected isMultiOrderQuery ( $order ) : boolean | ||
$order | ||
return | boolean |
protected isNotLastItemInArray ( $totalOrderByElements, $index ) : boolean | ||
$totalOrderByElements | ||
$index | ||
return | boolean |
public saveContent ( |
||
$content | ||
$comment | string | |
return | integer |
public searchAllContentTypes ( array $parameters = [], &$pager = [] ) | ||
$parameters | array |
public searchContent ( string $q, array $contenttypes = null, array $filters = null, integer $limit = 9999, integer $offset ) : mixed | ||
$q | string | Search string |
$contenttypes | array | Contenttype names to search for: - string: Specific contenttype - null: Every searchable contenttype |
$filters | array | Additional filters for contenttypes - key is contenttype - value is filter |
$limit | integer | limit the number of results |
$offset | integer | skip this number of results |
return | mixed | false if query is invalid, an array with results if query was executed |
public searchContentType ( $contenttypename, array $parameters = [], &$pager = [] ) | ||
$parameters | array |
protected tableExists ( $name ) : boolean | ||
$name | ||
return | boolean |
public updateSingleValue ( string $contenttype, integer $id, string $field, mixed $value ) : boolean | ||
$contenttype | string | Content Type to be edited. |
$id | integer | Id of content to be updated. |
$field | string | Field name of content to be changed. |
$value | mixed | New value to be defined on field. |
return | boolean | Returns true when update is done or false if not. |