Ejemplo n.º 1
0
	/**
	 * @covers Bedrock::defaults
	 * @covers Bedrock::properties
	 *
	 * @return void
	 */
	public function testDefaults() {
		// Setup
		$this->_object->defaults();
		$properties = $this->_object->properties();

		// Assertions
		$this->assertInstanceOf('Bedrock\\Common\\Config', $properties);
		$this->assertCount(0, $properties);
	}
Ejemplo n.º 2
0
	/**
	 * Applies any default properties for the current object.
	 */
	public function defaults() {
		try {
			parent::defaults();
			
			$this->_properties->merge(new \Bedrock\Common\Config(array(
				'name' => 'group',
				'label' => 'Group'
			)), true);
		}
		catch(\Exception $ex) {
			\Bedrock\Common\Logger::exception($ex);
		}
	}
Ejemplo n.º 3
0
	/**
	 * Applies any default properties for the current object.
	 */
	public function defaults() {
		try {
			parent::defaults();
			
			$this->_properties->merge(new \Bedrock\Common\Config(array(
				'name' => 'form',
				'id' => 'form',
				'method' => 'post',
				'action' => $_SERVER['PHP_SELF']
			)), true);
		}
		catch(\Exception $ex) {
			\Bedrock\Common\Logger::exception($ex);
		}
	}
Ejemplo n.º 4
0
	/**
	 * Applies any default properties for the current object.
	 */
	public function defaults() {
		try {
			parent::defaults();
			
			$this->_properties->merge(new \Bedrock\Common\Config(array(
				'name' => 'field',
				'label' => 'Field',
				'type' => 'std',
				'subtype' => 'text'
			)), true);
		}
		catch(\Exception $ex) {
			\Bedrock\Common\Logger::exception($ex);
		}
	}