コード例 #1
0
ファイル: Config.php プロジェクト: janoka/platform-dev
 /**
  * Get WYSIWYG profile object.
  *
  * @param string $format_name
  *    Text format machine name, for example: "full_html".
  *
  * @return object
  *    WYSIWYG profile object.
  */
 public function getProfile($format_name)
 {
     wysiwyg_profile_cache_clear();
     if ($profile = wysiwyg_profile_load($format_name)) {
         return $profile;
     }
 }
コード例 #2
0
ファイル: Config.php プロジェクト: kimlop/platform-dev
 /**
  * Remove a button from a WYSIWYG profile.
  *
  * @param string $profile
  *    Profile machine name. Ex. 'full_html', etc.
  * @param string $group
  *    Button group name. Ex. 'default', 'drupal', etc.
  * @param mixed $buttons
  *    Array of button names belonging to the $group button group.
  *    Ex. 'Anchor', 'BGColor', etc.
  */
 public function removeButtonsFromProfile($profile, $group, $buttons)
 {
     if ($profile = wysiwyg_profile_load('full_html')) {
         foreach ($buttons as $button) {
             unset($profile->settings['buttons'][$group][$button]);
         }
         $this->updateProfile($profile);
     }
 }