Version 5.0.0 beta 3

This commit is contained in:
Neo committed 2025-12-19 16:47:22 -08:00
1 parent f61b0da85d
commit e86153356a
108 files changed
+2927 -1573

No files matched your search

@@ -866,15 +866,29 @@ class Databases extends Model implements Permissions
*/
public function get_display_settings() : array
{
return isset( $this->_data['display_settings'] ) ?
json_decode( $this->_data['display_settings'], true ) :
array(
'index' => [ 'type' => 'all', 'layout' => 'featured', 'template' => null ],
'categories' => [ 'layout' => 'table', 'template' => null ],
'listing' => [ 'layout' => 'table', 'template' => null ],
'display' => [ 'layout' => 'custom', 'template' => 'display' ],
'form' => [ 'layout' => 'custom', 'template' => 'form' ]
);
$return = [];
if( isset( $this->_data['display_settings'] ) and $this->_data['display_settings'] )
{
$return = json_decode( $this->_data['display_settings'], true );
}
$default = array(
'index' => [ 'type' => 'all', 'layout' => 'featured', 'template' => null ],
'categories' => [ 'layout' => 'table', 'template' => null ],
'listing' => [ 'layout' => 'table', 'template' => null ],
'display' => [ 'layout' => 'custom', 'template' => 'display' ],
'form' => [ 'layout' => 'custom', 'template' => 'form' ]
);;
foreach( $default as $k => $v )
{
if( !isset( $return[ $k ] ) )
{
$return[ $k ] = $v;
}
}
return $return;
}
/**