mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Uploading and preparing the repository to the dev version.
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
This commit is contained in:
parent
afad45137e
commit
4cc2207513
846 changed files with 99453 additions and 2123 deletions
178
rainloop/v/0.0.0/app/libraries/RainLoop/Plugins/Property.php
Normal file
178
rainloop/v/0.0.0/app/libraries/RainLoop/Plugins/Property.php
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
<?php
|
||||
|
||||
namespace RainLoop\Plugins;
|
||||
|
||||
class Property
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $sName;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $sLabel;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $sDesc;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $iType;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $bAllowedInJs;
|
||||
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
private $mDefaultValue;
|
||||
|
||||
private function __construct($sName)
|
||||
{
|
||||
$this->sName = $sName;
|
||||
$this->iType = \RainLoop\Enumerations\PluginPropertyType::STRING;
|
||||
$this->mDefaultValue = '';
|
||||
$this->sLabel = '';
|
||||
$this->sDesc = '';
|
||||
$this->bAllowedInJs = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
*
|
||||
* @return \RainLoop\Plugins\Property
|
||||
*/
|
||||
public static function NewInstance($sName)
|
||||
{
|
||||
return new self($sName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $iType
|
||||
*
|
||||
* @return \RainLoop\Plugins\Property
|
||||
*/
|
||||
public function SetType($iType)
|
||||
{
|
||||
$this->iType = (int) $iType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $mDefaultValue
|
||||
*
|
||||
* @return \RainLoop\Plugins\Property
|
||||
*/
|
||||
public function SetDefaultValue($mDefaultValue)
|
||||
{
|
||||
$this->mDefaultValue = $mDefaultValue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sLabel
|
||||
*
|
||||
* @return \RainLoop\Plugins\Property
|
||||
*/
|
||||
public function SetLabel($sLabel)
|
||||
{
|
||||
$this->sLabel = $sLabel;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sDesc
|
||||
*
|
||||
* @return \RainLoop\Plugins\Property
|
||||
*/
|
||||
public function SetDescription($sDesc)
|
||||
{
|
||||
$this->sDesc = $sDesc;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $bValue = true
|
||||
* @return \RainLoop\Plugins\Property
|
||||
*/
|
||||
public function SetAllowedInJs($bValue = true)
|
||||
{
|
||||
$this->bAllowedInJs = !!$bValue;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Name()
|
||||
{
|
||||
return $this->sName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function AllowedInJs()
|
||||
{
|
||||
return $this->bAllowedInJs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Description()
|
||||
{
|
||||
return $this->sDesc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function Label()
|
||||
{
|
||||
return $this->sLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function Type()
|
||||
{
|
||||
return $this->iType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function DefaultValue()
|
||||
{
|
||||
return $this->mDefaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function ToArray()
|
||||
{
|
||||
return array(
|
||||
'',
|
||||
$this->sName,
|
||||
$this->iType,
|
||||
$this->sLabel,
|
||||
$this->mDefaultValue,
|
||||
$this->sDesc
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue