HEX
Server: Apache
System: Linux webm004.cluster121.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User: grainesdfo (155059)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/grainesdfo/www/wp-content/plugins/easing-slider/src/Plugin/Admin/Panels/ListSliders.php
<?php

namespace EasingSlider\Plugin\Admin\Panels;

use EasingSlider\Foundation\Admin\Panels\Panel;
use EasingSlider\Foundation\Contracts\Repositories\Repository;
use EasingSlider\Foundation\Contracts\Shortcodes\Shortcode;
use EasingSlider\Plugin\Admin\ListTables\Sliders as SlidersListTable;

/**
 * Exit if accessed directly
 */
if ( ! defined('ABSPATH')) {
	exit;
}

class ListSliders extends Panel
{
	/**
	 * Shortcode
	 *
	 * @var \EasingSlider\Foundation\Contracts\Shortcodes\Shortcode
	 */
	protected $shortcode;

	/**
	 * Sliders
	 *
	 * @var \EasingSlider\Foundation\Contracts\Repositories\Repository
	 */
	protected $sliders;

	/**
	 * Constructor
	 *
	 * @param  \EasingSlider\Foundation\Contracts\Repositories\Repository $sliders
	 * @param  \EasingSlider\Foundation\Contracts\Shortcodes\Shortcode    $shortcode
	 * @return void
	 */
	public function __construct(Repository $sliders, Shortcode $shortcode)
	{
		$this->sliders = $sliders;
		$this->shortcode = $shortcode;
	}

	/**
	 * Gets the page slug
	 *
	 * @return string|false
	 */
	protected function getPage()
	{
		if ( ! empty($_GET['page'])) {
			return $_GET['page'];
		}

		return false;
	}

	/**
	 * Displays the panel
	 *
	 * @return void
	 */
	public function display()
	{
		$listTable = new SlidersListTable(
			$this->sliders,
			$this->shortcode
		);

		$this->showView('list-sliders', array(
			'listTable' => $listTable,
			'page'      => $this->getPage()
		));
	}
}