public function store($check=true)
	{
		// Validate data?
		if ($check)
		{
			// Is data valid?
			if (!$this->check())
			{
				return false;
			}

			if ($this->_context)
			{
				$results = \Event::trigger('content.onContentBeforeSave', array(
					$this->_context,
					&$this,
					$this->exists()
				));
				foreach ($results as $result)
				{
					if ($result === false)
					{
						$this->setError(\App::get('language')->txt('Content failed validation.'));
						return false;
					}
				}
			}
		}

		// Attempt to store data
		if (!$this->_tbl->store())
		{
			$this->setError($this->_tbl->getError());
			return false;
		}

		return true;
	}
public function store($check=true)
	{
		// Validate data?
		if ($check)
		{
			// Is data valid?
			if (!$this->check())
			{
				return false;
			}

			if ($this->_context)
			{
				$results = \Event::trigger('content.onContentBeforeSave', array(
					$this->_context,
					&$this,
					$this->exists()
				));
				foreach ($results as $result)
				{
					if ($result === false)
					{
						$this->setError(\App::get('language')->txt('Content failed validation.'));
						return false;
					}
				}
			}
		}

		// Attempt to store data
		if (!$this->_tbl->store())
		{
			$this->setError($this->_tbl->getError());
			return false;
		}

		return true;
	}
public function store ( $ check = true ) { // Validate data? if ( $ check ) { // Is data valid? if ( ! $ this -> check ( ) ) { return false ; } if ( $ this -> _context ) { $ results = \ Event :: trigger ( 'content.onContentBeforeSave' , array ( $ this -> _context , & $ this , $ this -> exists ( ) ) ) ; foreach ( $ results as $ result ) { if ( $ result === false ) { $ this -> setError ( \ App :: get ( 'language' ) -> txt ( 'Content failed validation.' ) ) ; return false ; } } } } // Attempt to store data if ( ! $ this -> _tbl -> store ( ) ) { $ this -> setError ( $ this -> _tbl -> getError ( ) ) ; return false ; } return true ; }
Store changes to this database entry

@param   boolean  $check  Perform data validation check?
@return  boolean  False if error, True on success
Store changes to this database entry