updated FML
This commit is contained in:
@ -67,11 +67,21 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
*/
|
||||
protected $height = 0.;
|
||||
|
||||
/**
|
||||
* @var string $defaultHorizontalAlign Default horizontal alignment
|
||||
*/
|
||||
static protected $defaultHorizontalAlign = self::CENTER;
|
||||
|
||||
/**
|
||||
* @var string $horizontalAlign Horizontal alignment
|
||||
*/
|
||||
protected $horizontalAlign = self::CENTER;
|
||||
|
||||
/**
|
||||
* @var string $defaultVerticalAlign Default vertical alignment
|
||||
*/
|
||||
static protected $defaultVerticalAlign = self::CENTER2;
|
||||
|
||||
/**
|
||||
* @var string $verticalAlign Vertical alignment
|
||||
*/
|
||||
@ -130,6 +140,8 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
if ($controlId) {
|
||||
$this->setId($controlId);
|
||||
}
|
||||
$this->setHorizontalAlign(static::$defaultHorizontalAlign);
|
||||
$this->setVerticalAlign(static::$defaultVerticalAlign);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -310,6 +322,17 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
->setHeight($height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default horizontal alignment
|
||||
*
|
||||
* @api
|
||||
* @return string
|
||||
*/
|
||||
public static function getDefaultHorizontalAlign()
|
||||
{
|
||||
return static::$defaultHorizontalAlign;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the horizontal alignment
|
||||
*
|
||||
@ -321,6 +344,17 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
return $this->horizontalAlign;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default horizontal alignment
|
||||
*
|
||||
* @api
|
||||
* @param string $defaultHorizontalAlignment Default horizontal alignment
|
||||
*/
|
||||
public static function setDefaultHorizontalAlign($defaultHorizontalAlignment)
|
||||
{
|
||||
static::$defaultHorizontalAlign = (string)$defaultHorizontalAlignment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the horizontal alignment
|
||||
*
|
||||
@ -348,6 +382,17 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default vertical alignment
|
||||
*
|
||||
* @api
|
||||
* @return string
|
||||
*/
|
||||
public static function getDefaultVerticalAlign()
|
||||
{
|
||||
return static::$defaultVerticalAlign;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the vertical alignment
|
||||
*
|
||||
@ -359,6 +404,17 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
return $this->verticalAlign;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default vertical alignment
|
||||
*
|
||||
* @api
|
||||
* @param string $defaultVerticalAlignment Default vertical alignment
|
||||
*/
|
||||
public static function setDefaultVerticalAlign($defaultVerticalAlignment)
|
||||
{
|
||||
static::$defaultVerticalAlign = (string)$defaultVerticalAlignment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the vertical alignment
|
||||
*
|
||||
@ -400,6 +456,17 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
->setVerticalAlign($verticalAlign);
|
||||
}
|
||||
|
||||
/**
|
||||
* Center the default alignment
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function centerDefaultAlign()
|
||||
{
|
||||
static::$defaultHorizontalAlign = static::CENTER;
|
||||
static::$defaultVerticalAlign = static::CENTER2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Center the alignment
|
||||
*
|
||||
@ -424,6 +491,17 @@ abstract class Control implements Identifiable, Renderable, ScriptFeatureable
|
||||
return $this->clearAlign();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the default alignment
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
public static function clearDefaultAlign()
|
||||
{
|
||||
static::$defaultHorizontalAlign = null;
|
||||
static::$defaultVerticalAlign = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the alignment
|
||||
*
|
||||
|
Reference in New Issue
Block a user