# fluentform/1.2.4/app/Modules/Activator.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 1.2.4. 44 lines.

- Page: https://pluginprobe.com/plugins/fluentform/1.2.4/code/app/Modules/Activator.php
- Raw: https://pluginprobe.com/plugins/fluentform/1.2.4/raw/app/Modules/Activator.php
- Modified: 2018-02-03T11:29:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluentform/1.2.4/code/app/Modules/Activator.php#L10-L20`.

```php
<?php

namespace FluentForm\App\Modules;

use FluentForm\App\Modules\Acl\Acl;
use FluentForm\App\Databases\DatabaseMigrator;

class Activator
{
	/**
	 * This method will be called on plugin activation
	 * @return void
	 */
	public function handleActivation()
	{
        // We are going to migrate all the database tables here.
		DatabaseMigrator::run();

		// Assign fluentform permission set.
        Acl::setPermissions();
        
        $this->setDefaultGlobalSettings();
        $this->setCurrentVersion();
	}
	
	private function setDefaultGlobalSettings()
	{
		if(!get_option('_fluentform_global_form_settings')) {
			update_option('__fluentform_global_form_settings', array(
				'layout' => array(
					'labelPlacement' => 'top',
					'helpMessagePlacement' => 'with_label',
					'errorMessagePlacement' => 'inline',
					'cssClassName' => ''
				)
			));
		}
	}
	
	private function setCurrentVersion()
	{
		update_option('_fluentform_installed_version', '1.2.4');
	}
}
```
