-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8bd090
commit 566032b
Showing
9 changed files
with
221 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms; | ||
|
||
/** | ||
* @property string $icon; | ||
* | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
interface IHasIcon | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getIcon(); | ||
|
||
/** | ||
* @param string $icon | ||
* @return mixed | ||
*/ | ||
public function setIcon($icon); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms; | ||
|
||
/** | ||
* @property string $image; | ||
* | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
interface IHasImage | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getImage(); | ||
|
||
/** | ||
* @param string $image | ||
* @return mixed | ||
*/ | ||
public function setImage($image); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms; | ||
|
||
/** | ||
* @property string $name; | ||
* | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
interface IHasName | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function getName(); | ||
|
||
/** | ||
* @param string|array $name | ||
* @return mixed | ||
*/ | ||
public function setName($name); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms\traits; | ||
|
||
/** | ||
* @property $icon; | ||
* | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
trait THasIcon | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $_icon = ''; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getIcon() | ||
{ | ||
return $this->_icon; | ||
} | ||
|
||
/** | ||
* @param $icon | ||
* @return $this | ||
*/ | ||
public function setIcon($icon) | ||
{ | ||
$this->_icon = $icon; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms\traits; | ||
|
||
/** | ||
* @property $image; | ||
* | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
trait THasImage | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $_image = ''; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getImage() | ||
{ | ||
return $this->_image; | ||
} | ||
|
||
/** | ||
* @param $image | ||
* @return $this | ||
*/ | ||
public function setImage($image) | ||
{ | ||
$this->_image = $image; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
/** | ||
* @link https://cms.skeeks.com/ | ||
* @copyright Copyright (c) 2010 SkeekS | ||
* @license https://cms.skeeks.com/license/ | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
|
||
namespace skeeks\cms\traits; | ||
|
||
use yii\helpers\ArrayHelper; | ||
|
||
/** | ||
* @property $name; | ||
* | ||
* @author Semenov Alexander <semenov@skeeks.com> | ||
*/ | ||
trait THasName | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $_name = ''; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName() | ||
{ | ||
return $this->_name; | ||
} | ||
|
||
/** | ||
* @param string|array $name | ||
* @return $this | ||
*/ | ||
public function setName($name) | ||
{ | ||
if (is_array($name)) { | ||
$this->_name = \Yii::t( | ||
ArrayHelper::getValue($name, 0), | ||
ArrayHelper::getValue($name, 1, ''), | ||
ArrayHelper::getValue($name, 2, []), | ||
ArrayHelper::getValue($name, 3) | ||
); | ||
} else if (is_string($name)) { | ||
$this->_name = $name; | ||
} | ||
|
||
return $this; | ||
} | ||
} |