Exemplo n.º 1
0
 /**
  * Will prefix and return any string with the unique plugin prefix.
  *
  * @param string $sSuffix
  * @param string $sGlue
  * @return string
  */
 public function doPluginPrefix($sSuffix = '', $sGlue = '-')
 {
     $sPrefix = $this->oPluginVo->getFullPluginPrefix($sGlue);
     if ($sSuffix == $sPrefix || strpos($sSuffix, $sPrefix . $sGlue) === 0) {
         //it already has the prefix
         return $sSuffix;
     }
     return sprintf('%s%s%s', $sPrefix, empty($sSuffix) ? '' : $sGlue, empty($sSuffix) ? '' : $sSuffix);
 }
 protected function getBaseDisplayData()
 {
     return array('var_prefix' => $this->oPluginVo->getOptionStoragePrefix(), 'sPluginName' => $this->oPluginVo->getHumanName(), 'sFeatureName' => $this->getMainFeatureName(), 'fShowAds' => $this->getIsShowMarketing(), 'nonce_field' => $this->oPluginVo->getFullPluginPrefix(), 'sFeatureSlug' => $this->doPluginPrefix($this->sFeatureSlug), 'form_action' => 'admin.php?page=' . $this->doPluginPrefix($this->sFeatureSlug), 'nOptionsPerRow' => 1, 'aAllOptions' => $this->getOptions(), 'all_options_input' => $this->collateAllFormInputsForAllOptions());
 }