Craft\InstaBlog_InstallService::run PHP Method

run() public method

Installs InstaBlog!
public run ( ) : null
return null
    public function run()
    {
        $primaryLocaleId = craft()->i18n->getPrimarySiteLocaleId();
        $error = null;
        try {
            $this->_createInstaBlogContent($primaryLocaleId);
            $this->_copyTemplates();
        } catch (\Exception $e) {
            $error = 'An exception was thrown: ' . $e->getMessage();
        }
        if ($error === null) {
            Craft::log('Finished installing InstaBlog', LogLevel::Info, true, 'application', 'InstaBlog');
            return true;
        } else {
            Craft::log('Failed installing InstaBlog: ' . $error, LogLevel::Error, true, 'application', 'InstaBlog');
            return false;
        }
    }