namespace Elementor\Core\Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
* Base app utility class that provides shared functionality of apps.
abstract class App extends Module {
* Used to print the app and its components settings as a JavaScript object.
* @param string $handle Optional
* @since 2.6.0 added the `$handle` parameter
final protected function print_config( $handle = null ) {
$name = $this->get_name();
$js_var = 'elementor' . str_replace( ' ', '', ucwords( str_replace( '-', ' ', $name ) ) ) . 'Config';
$config = $this->get_settings() + $this->get_components_config();
$handle = 'elementor-' . $name;
Utils::print_js_config( $handle, $js_var, $config );
* Retrieves the app components settings.
private function get_components_config() {
foreach ( $this->get_components() as $id => $instance ) {
$settings[ $id ] = $instance->get_settings();