update
This commit is contained in:
35
wp-content/plugins/youtube-feed-pro/vendor/smashballoon/customizer/app/Tabs/Manager.php
vendored
Normal file
35
wp-content/plugins/youtube-feed-pro/vendor/smashballoon/customizer/app/Tabs/Manager.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Smashballoon\Customizer\Tabs;
|
||||
|
||||
use Smashballoon\Stubs\Traits\Singleton;
|
||||
/** @internal */
|
||||
class Manager
|
||||
{
|
||||
use Singleton;
|
||||
/**
|
||||
* @var Tab[]
|
||||
*/
|
||||
private $tabs = [];
|
||||
/**
|
||||
* @param Tab $tab
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register_tab(\Smashballoon\Customizer\Tabs\Tab $tab)
|
||||
{
|
||||
$this->tabs[] = $tab;
|
||||
}
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function get_tabs()
|
||||
{
|
||||
$tabs = [];
|
||||
foreach ($this->tabs as $tab) {
|
||||
$section_id = $tab->get_id();
|
||||
$tabs[$section_id] = ['id' => $section_id, 'heading' => $tab->get_heading(), 'sections' => $tab->get_sections()];
|
||||
}
|
||||
return $tabs;
|
||||
}
|
||||
}
|
||||
22
wp-content/plugins/youtube-feed-pro/vendor/smashballoon/customizer/app/Tabs/Tab.php
vendored
Normal file
22
wp-content/plugins/youtube-feed-pro/vendor/smashballoon/customizer/app/Tabs/Tab.php
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Smashballoon\Customizer\Tabs;
|
||||
|
||||
/** @internal */
|
||||
abstract class Tab
|
||||
{
|
||||
protected $id;
|
||||
protected $heading;
|
||||
public function get_sections()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
public function get_id()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
public function get_heading()
|
||||
{
|
||||
return $this->heading;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user