Caldera_Forms_Admin_Panel

The Caldera Forms Caldera Forms Admin Panel class.

Defined (1)

The class is defined in the following location(s).

/classes/admin/panel.php  
  1. class Caldera_Forms_Admin_Panel { 
  2.  
  3.  
  4. /** 
  5. * Get config for a form admin panel by name 
  6. * @since 1.5.0 
  7. * @param string $panel Admin panel name 
  8. * @return bool|array Panel config if foudn or false 
  9. */ 
  10. public static function get_panel( $panel ) { 
  11. $panels = self::get_panels(); 
  12. if( array_key_exists( strtolower( $panel ), $panels[ 'form_layout' ][ 'tabs' ] ) ) { 
  13. return $panels[ 'form_layout' ][ 'tabs' ][ $panel ]; 
  14. return false; 
  15.  
  16. /** 
  17. * Get panel HTML 
  18. * @since 1.5.0 
  19. * @param array $panel Panel config 
  20. * @param array $form Form config 
  21. * @return string 
  22. */ 
  23. public static function panel_html( array $panel, array $form ) { 
  24. ob_start(); 
  25. $element = Caldera_Forms_Forms::get_form( $form ); 
  26. include $panel[ 'canvas' ]; 
  27. $html = ob_get_clean(); 
  28. return $html; 
  29.  
  30. /** 
  31. * Get form editor admin panel setup 
  32. * @since 1.5.0 
  33. * @return array 
  34. */ 
  35. public static function get_panels() { 
  36.  
  37. /** 
  38. * Filter form editor admin panel setups 
  39. * @since unknown 
  40. * @param array $panels Panel config 
  41. */ 
  42. return apply_filters( 'caldera_forms_get_panel_extensions', array() ); 
  43.  
  44.