Exemplo n.º 1
0
 /**
  * Retrieves the file loader instance
  *
  * @param IfwPsn_Wp_Plugin_Manager $pm
  * @param array $twigOptions
  * @return IfwPsn_Wp_WunderScript_Parser
  */
 public static function getFileInstance(IfwPsn_Wp_Plugin_Manager $pm, $twigOptions = array())
 {
     if (self::$_instanceFile === null) {
         require_once dirname(__FILE__) . '/../Tpl.php';
         $env = IfwPsn_Wp_Tpl::getFilesytemInstance($pm, $twigOptions);
         self::$_instanceFile = new self($env);
     }
     return self::$_instanceFile;
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 public function getOnScreenHelp()
 {
     $this->addPlaceholder('post_status_before')->addPlaceholder('post_status_after');
     $placeholdersResult = $this->getDefaultPlaceholders(true, true);
     asort($placeholdersResult);
     $placeholdersDynamic = $this->getPlaceholders('dynamic');
     asort($placeholdersDynamic);
     $placeholdersArray = $this->getPlaceholders('arrays');
     asort($placeholdersArray);
     $context = array('placeholders' => $placeholdersResult, 'placeholdersDynamic' => $placeholdersDynamic, 'placeholdersArray' => $placeholdersArray);
     return IfwPsn_Wp_WunderScript_Parser::getFileInstance(IfwPsn_Wp_Plugin_Manager::getInstance('Psn'))->parse('admin_help_placeholders.html.twig', $context);
 }