PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.2.2
Pods – Custom Content Types and Fields v3.2.2
trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / src / Pods / Admin / Service_Provider.php
pods / src / Pods / Admin Last commit date
Config 2 years ago Service_Provider.php 3 years ago Settings.php 2 years ago
Service_Provider.php
39 lines
1 <?php
2
3 namespace Pods\Admin;
4
5 use Pods\Admin\Config\Pod;
6 use Pods\Admin\Config\Group;
7 use Pods\Admin\Config\Field;
8
9 /**
10 * Class Service_Provider.
11 *
12 * @since 2.8.0
13 */
14 class Service_Provider extends \Pods\Service_Provider_Base {
15
16 /**
17 * Registers the classes and functionality needed for Admin configs.
18 *
19 * @since 2.8.0
20 */
21 public function register() {
22 $this->container->singleton( Pod::class, Pod::class );
23 $this->container->singleton( Group::class, Group::class );
24 $this->container->singleton( Field::class, Field::class );
25 $this->container->singleton( Settings::class, Settings::class );
26
27 $this->hooks();
28 }
29
30 /**
31 * Hooks all the methods and actions the class needs.
32 *
33 * @since 2.8.0
34 */
35 protected function hooks() {
36 add_action( 'pods_admin_settings_init', $this->container->callback( Settings::class, 'hook' ) );
37 }
38 }
39