Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -11,43 +11,45 @@
|
||||
namespace IPS\cms\widgets;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Helpers\Form\TextArea;
|
||||
use IPS\Widget\Builder;
|
||||
use IPS\Widget\StaticCache;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* pagebuildertext Widget
|
||||
*/
|
||||
class _pagebuildertext extends \IPS\Widget\StaticCache implements \IPS\Widget\Builder
|
||||
class pagebuildertext extends StaticCache implements Builder
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
*/
|
||||
public $key = 'pagebuildertext';
|
||||
public string $key = 'pagebuildertext';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
*/
|
||||
public $app = 'cms';
|
||||
|
||||
/**
|
||||
* @brief Plugin
|
||||
*/
|
||||
public $plugin = '';
|
||||
public string $app = 'cms';
|
||||
|
||||
/**
|
||||
* Specify widget configuration
|
||||
*
|
||||
* @param null|\IPS\Helpers\Form $form Form object
|
||||
* @return null|\IPS\Helpers\Form
|
||||
* @param null|Form $form Form object
|
||||
* @return Form
|
||||
*/
|
||||
public function configuration( &$form=null )
|
||||
public function configuration( Form &$form=null ): Form
|
||||
{
|
||||
$form = parent::configuration( $form );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\TextArea( 'pagebuilder_text', ( isset( $this->configuration['pagebuilder_text'] ) ? $this->configuration['pagebuilder_text'] : '' ), FALSE, array( 'rows' => 10 ) ) );
|
||||
$form->add( new TextArea( 'pagebuilder_text', ( $this->configuration['pagebuilder_text'] ?? '' ), FALSE, array( 'rows' => 10 ) ) );
|
||||
return $form;
|
||||
}
|
||||
|
||||
@@ -56,7 +58,7 @@ class _pagebuildertext extends \IPS\Widget\StaticCache implements \IPS\Widget\Bu
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
public function render(): string
|
||||
{
|
||||
if ( ! empty( $this->configuration['pagebuilder_text'] ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user