2013-11-25 00:02:07 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FML\Types;
|
|
|
|
|
2014-01-19 19:30:21 +01:00
|
|
|
use FML\Controls\Control;
|
|
|
|
use FML\Elements\Format;
|
|
|
|
|
2013-11-25 00:02:07 +01:00
|
|
|
/**
|
2014-01-19 19:30:21 +01:00
|
|
|
* Interface for Element being able to contain other Controls
|
2013-11-25 00:02:07 +01:00
|
|
|
*
|
|
|
|
* @author steeffeen
|
2014-04-13 18:21:40 +02:00
|
|
|
* @copyright FancyManiaLinks Copyright © 2014 Steffen Schröder
|
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
2013-11-25 00:02:07 +01:00
|
|
|
*/
|
|
|
|
interface Container {
|
|
|
|
|
|
|
|
/**
|
2014-01-19 19:30:21 +01:00
|
|
|
* Add a new Child Control
|
2013-11-25 00:02:07 +01:00
|
|
|
*
|
2014-01-19 19:30:21 +01:00
|
|
|
* @param Control $child The Child Control to add
|
|
|
|
* @return \FML\Types\Container
|
2013-11-25 00:02:07 +01:00
|
|
|
*/
|
2014-01-19 19:30:21 +01:00
|
|
|
public function add(Control $child);
|
2013-11-25 00:02:07 +01:00
|
|
|
|
|
|
|
/**
|
2013-12-31 02:55:19 +01:00
|
|
|
* Remove all Children
|
2014-01-19 19:30:21 +01:00
|
|
|
*
|
|
|
|
* @return \FML\Types\Container
|
2013-11-25 00:02:07 +01:00
|
|
|
*/
|
|
|
|
public function removeChildren();
|
2014-01-19 19:30:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the Format Object of the Container
|
|
|
|
*
|
|
|
|
* @param Format $format New Format Object
|
|
|
|
* @return \FML\Types\Container
|
|
|
|
*/
|
|
|
|
public function setFormat(Format $format);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the Format Object of the Container
|
|
|
|
*
|
|
|
|
* @param bool $createIfEmpty (optional) Whether the Format Object should be created if it's not set yet
|
|
|
|
* @return \FML\Elements\Format
|
|
|
|
*/
|
|
|
|
public function getFormat($createIfEmpty = true);
|
2013-11-25 00:02:07 +01:00
|
|
|
}
|