Render the pdf_toc checkbox.

@param array $args
423966
function renderTOCField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCheckbox(
			[
				'id' => 'pdf_toc',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'pdf_toc',
				'value' => getset( $this->options, 'pdf_toc' ),
				'label' => $args[0],
			]
		);
	}
342534
private function renderWithColumns($propertyNames, $args, $firstSorting)
    {
        $label = [];
        if (!\is_array($args)) {
            // @codingStandardsIgnoreStart
            @\trigger_error('Warning, column layout without arguments will not be supported.', E_USER_DEPRECATED);
            // @codingStandardsIgnoreEnd
            $label[] = [
                'colspan' => \count($propertyNames),
                'class'   => 'tl_file_list col_all',
                'content' => $args
            ];
        } else {
            foreach ($propertyNames as $propertyName) {
                $class = 'tl_file_list col_' . $propertyName;
                if ($firstSorting === $propertyName) {
                    $class .= ' ordered_by';
                }

                $label[] = [
                    'colspan' => 1,
                    'class'   => $class,
                    'content' => $args[$propertyName] ?: '-'
                ];
            }
        }

        return $label;
    }
1168643
function renderRunningContentPartLeftField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCustomSelect(
			[
				'id' => 'running_content_part_left',
				'name' => 'running_content_part_left',
				'value' => getset( $this->options, 'running_content_part_left' ),
				'choices' => $args,
			]
		);
		$this->renderField(
			[
				'id' => 'running_content_part_left_custom',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'running_content_part_left',
				'value' => getset( $this->options, 'running_content_part_left' ),
				'type' => 'text',
				'class' => 'regular-text code',
			]
		);
	}
148209
function renderCompressImagesField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCheckbox(
			[
				'id' => 'ebook_compress_images',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'ebook_compress_images',
				'value' => ( isset( $this->options['ebook_compress_images'] ) ) ? $this->options['ebook_compress_images'] : '',
				'label' => $args[0],
			]
		);
	}
1328655
private function generateHtml($widget, ...$args)
    {
        // Everything inside this function is executed only when the cache is not available.
        $expensivePhpCode = function () use ($widget, $args) {
            $this->makeDataForView($widget, $args);

            // render the template with the resulting data.
            return $this->renderTemplate($widget);
        };

        // We first try to get the output from the cache before trying to run the expensive $expensivePhpCode...
        if ($this->_policies->widgetShouldUseCache()) {
            return app(Cache::class)->cacheResult($args, $expensivePhpCode, $widget);
        }

        return $expensivePhpCode();
    }
1251451
public static function render($name, $args = array())
    {
        global $PPHP;

        array_merge_assoc(
            self::$_stash,
            $args,
            array(
                'config' => $PPHP['config'],
                'session' => $_SESSION,
                'req' => grab('request')
            )
        );
        try {
            self::$_safeBody .= self::$_twig->render($name, self::$_stash);
        } catch (\Exception $e) {
            echo $e->getMessage();
        };
    }
243495
function renderSocialMediaField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCheckbox(
			[
				'id' => 'social_media',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'social_media',
				'value' => ( isset( $this->options['social_media'] ) ) ? $this->options['social_media'] : '',
				'label' => $args[0],
			]
		);
	}
1156399
static function renderRadioButtons( $args ) {
		$defaults = [
			'id' => null,
			'name' => null,
			'option' => null,
			'value' => '',
			'choices' => [],
			'custom' => false,
			'disabled' => false,
		];

		$args = wp_parse_args( $args, $defaults );

		$is_custom = false;
		if ( ! array_key_exists( $args['value'], $args['choices'] ) ) {
			$is_custom = true;
		}
		echo '<fieldset>';
		foreach ( $args['choices'] as $key => $label ) {
			printf(
				'<label for="%s"><input type="radio" id="%s" name="%s[%s]" value="%s" %s%s/>%s</label><br />',
				$args['id'] . '_' . sanitize_key( $key ),
				$args['id'] . '_' . sanitize_key( $key ),
				$args['name'],
				$args['option'],
				$key,
				( $args['custom'] && $is_custom && empty( $key ) ) ? 'checked' : checked( $key, $args['value'], false ),
				( ! empty( $args['disabled'] ) ) ? ' disabled' : '',
				$label
			);
		}
		echo '</fieldset>';
	}
1320123
function renderRomanizePartsField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCheckbox(
			[
				'id' => 'pdf_romanize_parts',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'pdf_romanize_parts',
				'value' => getset( $this->options, 'pdf_romanize_parts' ),
				'label' => $args[0],
			]
		);
	}
1089137
public function renderTableJs(\Twig_Environment $env, $args = array()) {
        $array = array();
        $config = $this->fillModel($array);
        $array['updateUrl'] =  $this->fetchUrl($args, 'update', $config->getUpdateRoute());
        $array['deleteUrl'] = $this->fetchUrl($args, 'delete', $config->getDeleteRoute());
        $array['addUrl'] = $this->fetchUrl($args, 'add', $config->getAddRoute());
        $array['dtDefaultOpts'] = $this->container->getParameter('twentysteps_auto_tables.default_datatables_options');
        $array['dtOpts'] = $config->getDataTablesOptions();
        $array['dtTagOpts'] = $this->getParameter($args, 'dtOptions', array());
        $array['tableId'] = $config->getId();
        $array['transScope'] = $config->getTransScope();
        $array['reloadAfterAdd'] = $this->getParameter($args, 'reloadAfterAdd', true);
        $array['reloadAfterUpdate'] = $this->getParameter($args, 'reloadAfterUpdate', false);
        $array['includeJavascript'] = $this->checkIncludeJavascript();
        $array['includeBootstrap3'] = $this->getParameter($args, 'includeBootstrap3', false);
        $array['includeJquery'] = $this->getParameter($args, 'includeJquery', FALSE);
        $array['includeJqueryUi'] = $this->getParameter($args, 'includeJqueryUi', $config->getFrontendFramework() == FrontendFramework::JQUERY_UI);
        $array['includeJqueryEditable'] = $this->getParameter($args, 'includeJqueryEditable', TRUE);
        $array['includeJqueryEditableDatePicker'] = $this->getParameter($args, 'includeJqueryEditableDatePicker', $config->getFrontendFramework() == FrontendFramework::JQUERY_UI);
        $array['includeJqueryEditableBootstrapDatePicker'] = $this->getParameter($args, 'includeJqueryEditableBootstrapDatePicker', $config->getFrontendFramework() == FrontendFramework::BOOTSTRAP3);
        $array['includeJqueryDataTables'] = $this->getParameter($args, 'includeJqueryDataTables', TRUE);
        $array['includeJqueryValidate'] = $this->getParameter($args, 'includeJqueryValidate', TRUE);
        $array['useJqueryUi'] = $config->getFrontendFramework() == FrontendFramework::JQUERY_UI;
        $array['useBootstrap'] = $config->getFrontendFramework() == FrontendFramework::BOOTSTRAP3;
        return $this->render($env, 'twentystepsAutoTablesBundle:AutoTablesExtension:autoTableJs.html.twig', $array);
    }
438504
final protected function renderForm(array $arguments)
    {
        /*
         * We begin by setting up the form service: request results and form
         * instance are inserted in the service, and are used afterwards.
         *
         * There are only two ways to be sure the values injected are correct:
         * when the form was actually submitted by the user, or when the
         * argument `object` of the view helper is filled with a form instance.
         */
        $this->formService->activateFormContext();

        /*
         * If the form was submitted, applying custom behaviours on its fields.
         */
        $this->formService->applyBehavioursOnSubmittedForm($this->controllerContext);

        /*
         * Adding the default class configured in TypoScript configuration to
         * the form HTML tag.
         */
        $this->addDefaultClass();

        /*
         * Handling data attributes that are added to the form HTML tag,
         * depending on several parameters.
         */
        $this->handleDataAttributes();

        /*
         * Including JavaScript and CSS assets in the page renderer.
         */
        $this->handleAssets();

        $this->timeTracker->logTime('pre-render');

        /*
         * Getting the result of the original Fluid `FormViewHelper` rendering.
         */
        $result = $this->getParentRenderResult($arguments);

        /*
         * Language files need to be included at the end, because they depend on
         * what was used by previous assets.
         */
        $this->getAssetHandlerConnectorManager()
            ->getJavaScriptAssetHandlerConnector()
            ->includeLanguageJavaScriptFiles();

        return $result;
    }
389414
function renderRunningContentBackMatterLeftField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCustomSelect(
			[
				'id' => 'running_content_back_matter_left',
				'name' => 'running_content_back_matter_left',
				'value' => getset( $this->options, 'running_content_back_matter_left' ),
				'choices' => $args,
			]
		);
		$this->renderField(
			[
				'id' => 'running_content_back_matter_left_custom',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'running_content_back_matter_left',
				'value' => getset( $this->options, 'running_content_back_matter_left' ),
				'type' => 'text',
				'class' => 'regular-text code',
			]
		);
	}
506992
protected function prepareStatus(string $status, array $args)
    {
        $this->status[$status] = $this->parseStatusArguments($status, $args);

        // Remove default publish metabox.
        $this->action->add('add_meta_boxes', function () {
            remove_meta_box('submitdiv', $this->slug, 'side');
        });

        // Apply selected status on save.
        $this->filter->add([
            'pre_post_status',
            'status_save_pre'
        ], [$this, 'applyStatus']);

        // Expose post type status for JS use.
        $this->filter->add('themosis_admin_global', function ($data) {
            $status['draft'] = $this->parseStatusArguments('draft', [
                'publish_text' => __('Save Draft')
            ]);

            $data['post_types'][$this->slug] = ['statuses' => array_merge($status, $this->status)];

            return $data;
        });

        // Reorder the list of statuses on the list table.
        // Put the "trash" item as the last one.
        $this->filter->add("views_edit-{$this->slug}", function ($views) {
            if (array_key_exists('trash', $views)) {
                $trash = $views['trash'];
                unset($views['trash']);
                end($views);
                $views['trash'] = $trash;
            }

            return $views;
        });
    }
666564
private function Format($args){
		$message = array();
		if( $args ){
			foreach($args as $a){
				$argValue = '';
				if( $a['name'] ){
					$argValue .= $a['name'] . ':';
				}
				if( is_object($a['value']) ){
					$argValue .= $a['value']->toCSS();
				}else{
					$argValue .= '???';
				}
				$message[] = $argValue;
			}
		}
		return implode(', ',$message);
	}
1275382
function renderPartTitle( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCheckbox(
			[
				'id' => 'part_title',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'part_title',
				'value' => ( isset( $this->options['part_title'] ) ) ? $this->options['part_title'] : '',
				'label' => $args[0],
			]
		);
	}
173295
public function renderStylesheets(\Twig_Environment $env, $args = array()) {
        $frontendFramework = $this->fetchAutoTablesGlobalConfiguration()->getFrontendFramework();
        return $this->render($env, 'twentystepsAutoTablesBundle:AutoTablesExtension:autoTableStylesheets.html.twig',
            array(
                'includeJqueryUi' => $this->getParameter($args, 'includeJqueryUi', $frontendFramework == FrontendFramework::JQUERY_UI),
                'includeBootstrap3' => $this->getParameter($args, 'includeBootstrap3', false)
            )
        );
    }
332817
function renderRunningContentChapterRightField( $args ) {
		unset( $args['label_for'], $args['class'] );
		$this->renderCustomSelect(
			[
				'id' => 'running_content_chapter_right',
				'name' => 'running_content_chapter_right',
				'value' => getset( $this->options, 'running_content_chapter_right' ),
				'choices' => $args,
			]
		);
		$this->renderField(
			[
				'id' => 'running_content_chapter_right_custom',
				'name' => 'pressbooks_theme_options_' . $this->getSlug(),
				'option' => 'running_content_chapter_right',
				'value' => getset( $this->options, 'running_content_chapter_right' ),
				'type' => 'text',
				'class' => 'regular-text code',
			]
		);
	}