Textpattern PHP Cross Reference Content Management Systems

Source: /textpattern/vendors/Textpattern/Skin/SkinInterface.php - 158 lines - 4234 bytes - Summary - Text - Print

Description: Skin Interface

   1  <?php
   2  
   3  /*
   4   * Textpattern Content Management System
   5   * https://textpattern.com/
   6   *
   7   * Copyright (C) 2020 The Textpattern Development Team
   8   *
   9   * This file is part of Textpattern.
  10   *
  11   * Textpattern is free software; you can redistribute it and/or
  12   * modify it under the terms of the GNU General Public License
  13   * as published by the Free Software Foundation, version 2.
  14   *
  15   * Textpattern is distributed in the hope that it will be useful,
  16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18   * GNU General Public License for more details.
  19   *
  20   * You should have received a copy of the GNU General Public License
  21   * along with Textpattern. If not, see <https://www.gnu.org/licenses/>.
  22   */
  23  
  24  /**
  25   * Skin Interface
  26   *
  27   * Implemented by Skin.
  28   *
  29   * @since   4.7.0
  30   * @package Skin
  31   */
  32  
  33  namespace Textpattern\Skin;
  34  
  35  interface SkinInterface
  36  {
  37      /**
  38       * $dirPath property setter.
  39       *
  40       * @param  string $path Custom skin directory path.
  41       *                      Builds the path from the 'path_to_site' + 'skin_dir'
  42       *                      if null.
  43       * @return string $this->dirPath
  44       */
  45  
  46      public function setDirPath($path = null);
  47  
  48      /**
  49       * $assets property setter.
  50       *
  51       * @param  array $pages  Page names to work with;
  52       * @param  array $forms  Form names to work with;
  53       * @param  array $styles CSS names to work with.
  54       * @return object $this   The current class object (chainable).
  55       */
  56  
  57      public function setAssets($pages = null, $forms = null, $styles = null);
  58  
  59      /**
  60       * $infos and $name properties setter.
  61       *
  62       * @param  string $name        Skin name;
  63       * @param  string $title       Skin title;
  64       * @param  string $version     Skin version;
  65       * @param  string $description Skin description;
  66       * @param  string $author      Skin author;
  67       * @param  string $author_uri  Skin author URL;
  68       * @return object $this        The current class object (chainable).
  69       */
  70  
  71      public function setInfos(
  72          $name,
  73          $title = null,
  74          $version = null,
  75          $description = null,
  76          $author = null,
  77          $author_uri = null
  78      );
  79  
  80      /**
  81       * Get a $dir property value related subdirectory path.
  82       *
  83       * @param  string $name Directory(/skin) name (default: $this->getName()).
  84       * @return string       The Path
  85       */
  86  
  87      public function getSubdirPath($name = null);
  88  
  89      /**
  90       * Update the txp_section table.
  91       *
  92       * @param  string $set   The SET clause (default: "skin = '".doSlash($this->getName())."'")
  93       * @param  string $where The WHERE clause (default: "skin = '".doSlash($this->getBase())."'")
  94       * @return bool          FALSE on error.
  95       */
  96  
  97      public function updateSections($set = null, $where = null);
  98  
  99      /**
 100       * $uploaded property getter.
 101       *
 102       * @param  bool $expanded Set it to false to get a simple associative
 103       *                        array of skin names and their titles.
 104       * @return array
 105       */
 106  
 107      public function getUploaded($expanded = true);
 108  
 109      /**
 110       * Create/CreateFrom a single skin (and its related assets)
 111       * Merges results in the related property.
 112       *
 113       * @return object $this The current object (chainable).
 114       */
 115  
 116      public function create();
 117  
 118      /**
 119       * Update a single skin (and its related dependencies)
 120       * Merges results in the related property.
 121       *
 122       * @return object $this The current object (chainable).
 123       */
 124  
 125      public function update();
 126  
 127      /**
 128       * Duplicate multiple skins (and their related $assets)
 129       * Merges results in the related property.
 130       *
 131       * @return object $this The current object (chainable).
 132       */
 133  
 134      public function duplicate();
 135  
 136      /**
 137       * Delete multiple skins (and their related $assets + directories if empty)
 138       * Merges results in the related property.
 139       *
 140       * @return object $this The current object (chainable).
 141       */
 142  
 143      public function delete($sync = false);
 144  
 145      /**
 146       * Control the admin tab.
 147       */
 148  
 149      public function admin();
 150  
 151      /**
 152       * Render (echo) the $step related admin tab.
 153       *
 154       * @param string $step
 155       */
 156  
 157      public function render($step);
 158  }

title

Description

title

Description

title

Description

title

title

Body