Setting
class Setting extends Model (View source)
Traits
Properties
protected | $presenterInstance | from HasPresenter | |
$translatedAttributes | |||
$timestamps | from Model | ||
protected | $cropParamsKeys | from HasMedias | |
$useTranslationFallback | |||
protected | $fillable |
Methods
No description
Checks if this model is translatable.
This method should return the full url. By default this will be based on the controller slug or urlWithoutSlug. But it can be overwritten in order to fully customize the link.
No description
No description
No description
No description
Checks if this model has active translations.
Returns all translations for a given attribute.
Checks if an image has been attached for a role and crop.
Returns the URL of the attached image for a role and crop.
Returns an array of URLs of all attached images for a role and crop.
Returns an array of URLs of all attached images for a role, including all crops.
Returns an array of meta information for the image attached for a role and crop.
Returns an array of meta information for all images attached for a role and crop.
Returns an array of meta information for all images attached for a role, including all crops.
Returns the alt text of the image attached for a role.
Returns the caption of the image attached for a role.
Returns the video URL of the image attached for a role.
Returns the media object attached for a role and crop.
Returns the LQIP base64 encoded string for a role.
Returns the URL of the social image for a role and crop.
Returns the URL of the CMS image for a role and crop.
Returns the URL of the default CMS image for this model.
Returns the media objects associated with a role and crop.
No description
No description
Details
object
present(string $presenter = 'presenter')
No description
object
presentAdmin()
No description
$this
setPresenter(string $presenter, string $presenterProperty = 'presenter')
No description
$this
setPresenterAdmin(string $presenter)
No description
bool
isTranslatable(null|array|string $columns = null)
Checks if this model is translatable.
If no columns/column is provided it will return true if the model itself is translatable.
in
Model at line 31
protected bool
isTranslationModel()
No description
in
Model at line 36
Builder
scopePublished(Builder $query)
No description
in
Model at line 41
Builder
scopeAccessible(Builder $query)
No description
in
Model at line 78
Builder
scopePublishedInListings(Builder $query)
No description
in
Model at line 91
Builder
scopeVisible(Builder $query)
No description
in
Model at line 116
void
setPublishStartDateAttribute($value)
No description
in
Model at line 121
Builder
scopeDraft(Builder $query)
No description
in
Model at line 126
Builder
scopeOnlyTrashed(Builder $query)
No description
in
Model at line 131
array
getFillable()
No description
in
Model at line 159
array
getTranslatedAttributes()
No description
in
Model at line 166
static protected void
bootTaggableTrait()
No description
in
Model at line 174
MorphToMany
tags()
No description
in
Model at line 185
string
getFullUrl()
This method should return the full url. By default this will be based on the controller slug or urlWithoutSlug. But it can be overwritten in order to fully customize the link.
This link is used by for example TwillUtil::parseInternalLinks
getTranslationModelNameDefault()
No description
Builder
scopeWithActiveTranslations(Builder $query, string|null $locale = null)
No description
Builder
scopeOrderByTranslation(Builder $query, string $orderField, string $orderType = 'ASC', string|null $locale = null)
No description
Builder
scopeOrderByRawByTranslation(Builder $query, string $orderRawString, string $groupByField, string|null $locale = null)
No description
bool
hasActiveTranslation(string|null $locale = null)
Checks if this model has active translations.
Collection
getActiveLanguages()
No description
Collection
translatedAttribute(string $key)
Returns all translations for a given attribute.
array
getMediasParams()
No description
static void
bootHasMedias()
No description
MorphToMany
medias()
Defines the many-to-many relationship for media objects.
bool
hasImage(string $role, string $crop = 'default')
Checks if an image has been attached for a role and crop.
string|null
image(string $role, string $crop = 'default', array $params = [], bool $has_fallback = false, bool $cms = false, Media|null|bool $media = null)
Returns the URL of the attached image for a role and crop.
array
images(string $role, string $crop = 'default', array $params = [])
Returns an array of URLs of all attached images for a role and crop.
array
imagesWithCrops(string $role, array $params = [])
Returns an array of URLs of all attached images for a role, including all crops.
array
imageAsArray(string $role, string $crop = 'default', array $params = [], Media|null $media = null)
Returns an array of meta information for the image attached for a role and crop.
array
imagesAsArrays(string $role, string $crop = 'default', array $params = [])
Returns an array of meta information for all images attached for a role and crop.
array
imagesAsArraysWithCrops(string $role, array $params = [])
Returns an array of meta information for all images attached for a role, including all crops.
string
imageAltText(string $role, Media|null $media = null)
Returns the alt text of the image attached for a role.
string
imageCaption(string $role, Media|null $media = null)
Returns the caption of the image attached for a role.
string
imageVideo(string $role, Media|null $media = null)
Returns the video URL of the image attached for a role.
Media|null
imageObject(string $role, string $crop = 'default')
Returns the media object attached for a role and crop.
string|null
lowQualityImagePlaceholder(string $role, string $crop = 'default', array $params = [], bool $has_fallback = false)
Returns the LQIP base64 encoded string for a role.
Use this in conjunction with the RefreshLQIP
Artisan command.
string|null
socialImage(string $role, string $crop = 'default', array $params = [], bool $has_fallback = false)
Returns the URL of the social image for a role and crop.
string
cmsImage(string $role, string $crop = 'default', array $params = [])
Returns the URL of the CMS image for a role and crop.
string
defaultCmsImage(array $params = [])
Returns the URL of the default CMS image for this model.
Collection
imageObjects(string $role, string $crop = 'default')
Returns the media objects associated with a role and crop.
getTable()
No description
protected string
getTranslationRelationKey()
No description