protected function ApiSettingsForm::moduleConfigPublishingBuildForm in Facebook Instant Articles 3.x
Same name and namespace in other branches
- 8.2 src/Form/ApiSettingsForm.php \Drupal\fb_instant_articles\Form\ApiSettingsForm::moduleConfigPublishingBuildForm()
Add the publishing settings sub-section.
Parameters
array $form: Form array.
\Drupal\Core\Form\FormStateInterface $form_state: Form state.
Return value
array Form array.
1 call to ApiSettingsForm::moduleConfigPublishingBuildForm()
- ApiSettingsForm::buildForm in src/
Form/ ApiSettingsForm.php - Form constructor.
File
- src/
Form/ ApiSettingsForm.php, line 429
Class
- ApiSettingsForm
- Facebook Instant Articles API form.
Namespace
Drupal\fb_instant_articles\FormCode
protected function moduleConfigPublishingBuildForm(array $form, FormStateInterface $form_state) {
$form['module_config']['publishing'] = [
'#type' => 'details',
'#title' => $this
->t('Publishing settings'),
'#open' => TRUE,
];
$form['module_config']['publishing']['development_mode'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Development Mode'),
'#default_value' => $this
->config('fb_instant_articles.settings')
->get('development_mode'),
'#description' => $this
->t('When publishing in development, none of your articles will be made live, and they will be saved as drafts you can edit in the Instant Articles library on your Facebook Page. Whether in development mode or not, articles will not be published live until you have submitted a sample batch to Facebook and passed a one-time review.'),
];
return $form;
}