Class yeesoft\Yee

Inheritanceyeesoft\Yee » yii\base\Component

YeeCMS component. Contains basic settings and functions of YeeCMS.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
checkAttempts() Check how much attempts to login, reset or update password user has been made in $attemptsTimeout seconds. yeesoft\Yee
getDisplayLanguageShortcode() Returns language shortcode that will be displayed on frontend. yeesoft\Yee
getDisplayLanguages() Returns list of languages used in frontend rules. Contains the same values as $languages but keys is replaced with $languageRedirects. yeesoft\Yee
getIsMultilingual() Return true if site is multilingual. yeesoft\Yee
getSourceLanguageShortcode() Returns original language shortcode from its redirect. yeesoft\Yee
getVersion() Returns a string representing the current version of the Yee CMS Core. yeesoft\Yee
init() yeesoft\Yee
powered() Returns an HTML hyperlink that can be displayed on your Web page. yeesoft\Yee

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
initEmailOptions() Prepare mailer options. Merge given email templates options with default. yeesoft\Yee
initFormatter() Updates formatter to display date and time correcty. yeesoft\Yee
initLanguageOptions() Prepare mailer options. Merge given email templates options with default. yeesoft\Yee
registerTranslations() Register YeeCMS DB message translations. yeesoft\Yee

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
SESSION_ATTEMPTS_COUNT '_attempt_count' Session ID of login attempts count. yeesoft\Yee
SESSION_LAST_ATTEMPT_TIME '_last_attempt' Session ID of last login attempt. yeesoft\Yee
VERSION '0.1.0' Version number of the component. yeesoft\Yee

Property Details

$_defaultEmailTemplates protected property
protected array $_defaultEmailTemplates = ['signup-confirmation' => '/mail/signup-email-confirmation-html''password-reset' => '/mail/password-reset-html''confirm-email' => '/mail/email-confirmation-html']
$_displayLanguages protected property
protected array $_displayLanguages null
$attemptsTimeout public property
public int $attemptsTimeout 60
$auth_assignment_table public property
public string $auth_assignment_table '{{%auth_assignment}}'
$auth_item_child_table public property
public string $auth_item_child_table '{{%auth_item_child}}'
$auth_item_group_table public property
public string $auth_item_group_table '{{%auth_item_group}}'
$auth_item_table public property
public string $auth_item_table '{{%auth_item}}'
$auth_rule_table public property
public string $auth_rule_table '{{%auth_rule}}'
$captchaAction public property
public array $captchaAction = ['class' => 'yii\captcha\CaptchaAction''minLength' => 5'maxLength' => 5'height' => 45'width' => 100'padding' => 0]
$commonPermissionName public property
public string $commonPermissionName 'commonPermission'
$confirmationTokenExpire public property
public int $confirmationTokenExpire 3600
$defaultRoles public property
public array $defaultRoles = []
$emailConfirmationRequired public property
$emailSender public property
public string $emailSender null
$emailTemplates public property
public array $emailTemplates = []
$languageRedirects public property
public array $languageRedirects = ['en-US' => 'en']
$languages public property
public array $languages = ['en-US' => 'English']
$maxAttempts public property
public int $maxAttempts 5
$user_table public property
public string $user_table '{{%user}}'
$user_visit_log_table public property
public string $user_visit_log_table '{{%user_visit_log}}'
$usernameBlackRegexp public property
public string $usernameBlackRegexp '/^(.)*admin(.)*$/i'
$usernameRegexp public property
public string $usernameRegexp '/^(\w|\d)+$/'

Method Details

checkAttempts() public method

Check how much attempts to login, reset or update password user has been made in $attemptsTimeout seconds.

public boolean checkAttempts ( )
getDisplayLanguageShortcode() public method

Returns language shortcode that will be displayed on frontend.

public string getDisplayLanguageShortcode ( $language )
$language string
getDisplayLanguages() public method

Returns list of languages used in frontend rules. Contains the same values as $languages but keys is replaced with $languageRedirects.

public array getDisplayLanguages ( )
getIsMultilingual() public method

Return true if site is multilingual.

public boolean getIsMultilingual ( )
getSourceLanguageShortcode() public method

Returns original language shortcode from its redirect.

public string getSourceLanguageShortcode ( $language )
$language string
getVersion() public static method

Returns a string representing the current version of the Yee CMS Core.

public static string getVersion ( )
return string

The version of Yee CMS Core

init() public method

public void init ( )
initEmailOptions() protected method

Prepare mailer options. Merge given email templates options with default.

protected void initEmailOptions ( )
initFormatter() protected method

Updates formatter to display date and time correcty.

protected void initFormatter ( )
initLanguageOptions() protected method

Prepare mailer options. Merge given email templates options with default.

protected void initLanguageOptions ( )
powered() public static method

Returns an HTML hyperlink that can be displayed on your Web page.

public static string powered ( )
registerTranslations() protected method

Register YeeCMS DB message translations.

protected void registerTranslations ( )