* @return array */ public function get_common_attributes(): array { return (array) apply_filters( 'advanced-sidebar-menu/blocks/common-attributes/attributes', [ 'style' => Attribute::factory( [ 'type' => 'object', ] ), Menu_Abstract::TITLE => Attribute::factory( [ 'type' => 'string', ] ), ], $this ); } /** * Common features all blocks supports. * * @link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports * * @return array */ public function get_block_supports(): array { $basic_support = [ 'anchor' => true, 'html' => false, ]; return (array) apply_filters( 'advanced-sidebar-menu/blocks/common-attributes/supports', $basic_support, $this ); } /** * Get all attributes used for previewing the block. * * @phpstan-return array<'clientId'|'isServerSideRenderRequest'|'sidebarId', Attribute> * @return array */ public function get_server_side_render_attributes(): array { return [ Block_Abstract::BLOCK_ID => Attribute::factory( [ 'type' => 'string', ] ), Block_Abstract::RENDER_REQUEST => Attribute::factory( [ 'type' => 'boolean', ] ), Block_Abstract::SIDEBAR_ID => Attribute::factory( [ 'type' => 'string', ] ), ]; } }