Version 5.0.0 beta 5

This commit is contained in:
Neo committed 2025-12-19 17:04:22 -08:00
1 parent 2f24f9de48
commit 57d9db6ce2
218 files changed
+5331 -7416

No files matched your search

@@ -401,7 +401,7 @@ class Announcement extends Item
{
foreach ( Application::load( $obj->app )->extensions( 'core', 'Announcements' ) as $key => $extension )
{
$field = $extension->getSettingField( [] );
$field = $extension->getSettingField( $obj );
$obj->ids = is_array( $values[ $field->name ] ) ? implode( ",", array_keys( $values[ $field->name ] ) ) : $values[ $field->name ];
$obj->location = mb_substr( $key, mb_strpos( $key, '_' ) );
}
@@ -217,7 +217,7 @@ class Feature extends ActiveRecord
if ( $this->object === NULL )
{
$class = $this->class;
if( IPS::classUsesTrait( $class, 'IPS\Content\Featurable' ) )
if( class_exists( $class ) and IPS::classUsesTrait( $class, 'IPS\Content\Featurable' ) )
{
$this->object = $class::load( $this->class_id );
}
@@ -649,6 +649,13 @@ class Feature extends ActiveRecord
{
$object = parent::constructFromData( $data, $updateMultitonStoreIfExists );
static::$classAndIdLookup[ $object->class ][ $object->class_id ] = $object->id;
/* If the class does not exist, throw an exception */
if( !class_exists( $object->class ) )
{
throw new OutOfRangeException;
}
return $object;
}
@@ -270,6 +270,13 @@ abstract class FrontNavigationAbstract
*/
abstract public function link() : Url|string|null;
/**
* Get Type Title which will display in the AdminCP Menu Manager
*
* @return string
*/
abstract public static function typeTitle(): string;
/**
* Get Attributes
*
@@ -285,10 +292,7 @@ abstract class FrontNavigationAbstract
*
* @return bool
*/
public function active() : bool
{
return FALSE;
}
abstract public function active() : bool;
/**
* Is this item, or any of its child items, active?