Пример #1
0
 function delete()
 {
     $options = $this->Options();
     foreach ($options as $option) {
         $option->delete();
     }
     parent::delete();
 }
	/**
	 * Deletes all the options attached to this field before
	 * deleting the field. Keeps stray options from floating 
	 * around
	 *
	 * @return void
	 */
	public function delete() {
  		$options = $this->Options();
		if($options) {
			foreach($options as $option) {
				$option->delete();
			}
		}
		parent::delete();   
	}