Version 5.0.0 beta 8
This commit is contained in:
1 parent
54d5dcd0a0
commit
214f649f1d
483 files changed
+35354
-33568
No files matched your search
@@ -40,11 +40,14 @@ use IPS\Patterns\ActiveRecord;
|
||||
use IPS\Request;
|
||||
use IPS\Theme;
|
||||
use IPS\Widget;
|
||||
use IPS\Widget\Polymorphic;
|
||||
use LogicException;
|
||||
use OutOfRangeException;
|
||||
use ParseError;
|
||||
use function class_implements;
|
||||
use function defined;
|
||||
use function func_get_args;
|
||||
use function get_class;
|
||||
use function in_array;
|
||||
use function intval;
|
||||
use function is_array;
|
||||
@@ -628,9 +631,17 @@ EOF;
|
||||
{
|
||||
$templates = array( '_default_' => Member::loggedIn()->language()->addToStack('content_block_template_use_default') );
|
||||
|
||||
$keys =[ $this->widget()->key ];
|
||||
if( in_array( Polymorphic::class, class_implements( $this->widget() ) ) )
|
||||
{
|
||||
/* @var Polymorphic $widgetClass */
|
||||
$widgetClass = get_class( $this->widget() );
|
||||
$keys[] = $widgetClass::getBaseKey();
|
||||
}
|
||||
|
||||
foreach( Templates::getTemplates( Templates::RETURN_BLOCK ) as $id => $obj )
|
||||
{
|
||||
if ( $obj->group == $this->widget()->key )
|
||||
if( in_array( $obj->group, $keys ) )
|
||||
{
|
||||
$templates[ $obj->key ] = $obj->title;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user