meta( 'permanently_locked', true ); } /** * @return bool */ protected function is_atomic_container(): bool { return false; } /** * {@inheritdoc} */ public static function get_element_type(): string { return Smart_Menu::TYPE_TOGGLE; } /** * {@inheritdoc} */ public function get_title() { return __( 'Menu Toggle', 'reactwoo-atomic' ); } /** * {@inheritdoc} */ public function get_icon() { return 'eicon-menu-bar'; } /** * {@inheritdoc} */ protected function should_show_in_panel() { return false; } /** * {@inheritdoc} */ protected function get_templates(): array { return array( 'reactwoo-atomic/smart-menu-toggle' => __DIR__ . '/templates/smart-menu-toggle.html.twig', ); } /** * {@inheritdoc} */ protected function build_template_context(): array { $ctx = class_exists( Render_Context::class ) ? Render_Context::get( Smart_Menu::class ) : array(); return array_merge( $this->build_base_template_context(), array( 'mobile_toggle_text' => isset( $ctx['mobile-toggle-text'] ) ? (string) $ctx['mobile-toggle-text'] : __( 'Menu', 'reactwoo-atomic' ), 'menu_id' => isset( $ctx['menu-id'] ) ? (string) $ctx['menu-id'] : '', ) ); } }