SilverStripe Search

SearchLog extends DataObject
in package
implements PermissionProvider

Class \Firesphere\SearchSearch\Models\SearchLog

Table of Contents

Interfaces

PermissionProvider

Properties

$Index  : string
$Level  : string
$Message  : string
$Timestamp  : string
$Type  : string
$row_color  : array<string|int, mixed>
$db  : array<string|int, mixed>
$default_sort  : string
$indexes  : array<string|int, mixed>
$searchable_fields  : array<string|int, mixed>
$summary_fields  : array<string|int, mixed>
$table_name  : string

Methods

canCreate()  : bool|mixed
Not creatable by users
canDelete()  : bool|mixed
Only deleteable by admins or when in dev mode to clean up
canEdit()  : bool|mixed
Not editable by users
canView()  : bool|mixed
Member has view access?
getExtraClass()  : mixed|string
Get the extra classes to colour the gridfield rows
getLastErrorLine()  : string
Return the first line of this log item error
onBeforeWrite()  : mixed
Convert the Timestamp to a DBDatetime for compatibility
providePermissions()  : array<string|int, mixed>
Return a map of permission codes to add to the dropdown shown in the Security section of the CMS.

Properties

$row_color

protected static array<string|int, mixed> $row_color = ['ERROR' => 'alert alert-danger', 'WARN' => 'alert alert-warning', 'INFO' => 'alert alert-info']

Used to give the Gridfield rows a corresponding colour

$db

private static array<string|int, mixed> $db = ['Timestamp' => 'Datetime', 'Index' => 'Varchar(255)', 'Type' => 'Enum("Config,Index,Query")', 'Level' => 'Varchar(10)', 'Message' => 'Text']

Database columns

$default_sort

private static string $default_sort = 'Timestamp DESC'

Default sort

$indexes

private static array<string|int, mixed> $indexes = ['Timestamp' => true]

Timestamp is indexed

$searchable_fields

private static array<string|int, mixed> $searchable_fields = ['Created', 'Timestamp', 'Index', 'Type', 'Level']

Searchable fields

$summary_fields

private static array<string|int, mixed> $summary_fields = ['Timestamp', 'Index', 'Type', 'Level']

Summary fields

$table_name

private static string $table_name = 'Search_SearchLog'

Database table name

Methods

canCreate()

Not creatable by users

public canCreate([null|Member $member = null ][, array<string|int, mixed> $context = [] ]) : bool|mixed
Parameters
$member : null|Member = null
$context : array<string|int, mixed> = []
Return values
bool|mixed

canDelete()

Only deleteable by admins or when in dev mode to clean up

public canDelete([null|Member $member = null ]) : bool|mixed
Parameters
$member : null|Member = null
Return values
bool|mixed

canEdit()

Not editable by users

public canEdit([null|Member $member = null ]) : bool|mixed
Parameters
$member : null|Member = null
Return values
bool|mixed

canView()

Member has view access?

public canView([null|Member $member = null ]) : bool|mixed
Parameters
$member : null|Member = null
Return values
bool|mixed

getExtraClass()

Get the extra classes to colour the gridfield rows

public getExtraClass() : mixed|string
Return values
mixed|string

getLastErrorLine()

Return the first line of this log item error

public getLastErrorLine() : string
Return values
string

onBeforeWrite()

Convert the Timestamp to a DBDatetime for compatibility

public onBeforeWrite() : mixed

providePermissions()

Return a map of permission codes to add to the dropdown shown in the Security section of the CMS.

public providePermissions() : array<string|int, mixed>

array( 'VIEW_SITE' => 'View the site', );

Return values
array<string|int, mixed>

        
On this page

Search results