get_all_languages() public method

Returns an array with objects of all available languages.
Since: 3.0.0
public get_all_languages ( ) : object[]
return object[] The array with objects of all available languages.
    /**
     * Print tab content and provide two hooks.
     *
     * @return void
     */
    public function render_content()
    {
        ?>
		<form action="<?php 
        echo $this->setting->url();
        ?>
" method="post">
			<input type="hidden" name="action" value="<?php 
        echo esc_attr($this->setting->action());
        ?>
" />
			<input type="hidden" name="id" value="<?php 
        echo esc_attr($this->blog_id);
        ?>
" />
			<?php 
        echo \Inpsyde\MultilingualPress\nonce_field($this->nonce);
        $siteoption = get_site_option('inpsyde_multilingual', []);
        echo '<table class="form-table mlp-admin-settings-table">';
        $this->show_language_options($siteoption, $this->languages->get_all_languages());
        $this->show_blog_relationships($siteoption);
        /**
         * Runs at the end of but still inside the site settings table.
         *
         * @param int $blog_id Blog ID.
         */
        do_action('mlp_blogs_add_fields', $this->blog_id);
        if (has_action('mlp_blogs_add_fields_secondary')) {
            _doing_it_wrong('mlp_blogs_add_fields_secondary', 'mlp_blogs_add_fields_secondary is deprecated, use mlp_blogs_add_fields instead.', '2.1');
        }
        /**
         * @see mlp_blogs_add_fields
         * @deprecated
         */
        do_action('mlp_blogs_add_fields_secondary', $this->blog_id);
        echo '</table>';
        submit_button();
        ?>
		</form>
		<?php 
    }
    /**
     * Renders the MultilingualPress table, and fires an action to inject markup.
     *
     * @wp-hook network_site_new_form
     *
     * @return void
     */
    public function render()
    {
        $languages = $this->languages->get_all_languages();
        ?>
		<h2>
			<?php 
        esc_html_e('MultilingualPress', 'multilingual-press');
        ?>
		</h2>
		<table class="form-table">
			<tr class="form-field">
				<th scope="row">
					<label for="mlp-site-language">
						<?php 
        esc_html_e('Language', 'multilingual-press');
        ?>
					</label>
				</th>
				<td>
					<select name="inpsyde_multilingual_lang" id="mlp-site-language" autocomplete="off">
						<option value="-1">
							<?php 
        esc_html_e('Choose language', 'multilingual-press');
        ?>
						</option>
						<?php 
        foreach ($languages as $language) {
            ?>
							<?php 
            $this->render_language_option($language);
            ?>
						<?php 
        }
        ?>
					</select>
				</td>
			</tr>
			<tr class="form-field">
				<th scope="row">
					<label for="inpsyde_multilingual_text">
						<?php 
        esc_html_e('Alternative language title', 'multilingual-press');
        ?>
					</label>
				</th>
				<td>
					<input type="text" name="inpsyde_multilingual_text" class="regular-text"
						id="inpsyde_multilingual_text">
					<p class="description">
						<?php 
        esc_html_e('Enter a title here that you want to be displayed in the frontend instead of the default one (i.e. "My English Site")', 'multilingual-press');
        ?>
					</p>
				</td>
			</tr>
			<tr class="form-field">
				<th scope="row">
					<label for="inpsyde_multilingual_text">
						<?php 
        esc_html_e('Relationships', 'multilingual-press');
        ?>
					</label>
				</th>
				<td>
					<?php 
        $this->render_relationships();
        ?>
					<p class="description">
						<?php 
        esc_html_e('You can connect this site only to sites with an assigned language. Other sites will not show up here.', 'multilingual-press');
        ?>
					</p>
				</td>
			</tr>
			<?php 
        /**
         * Fires at the end of but still inside the MultilingualPress table on the Add New Site admin page.
         */
        do_action('mlp_after_new_blog_fields');
        ?>
		</table>
		<?php 
    }