existsData() public static method

Does the data item exist.
public static existsData ( integer $id ) : boolean
$id integer Id of the data item.
return boolean
Example #1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if ($this->id !== null && BackendFormBuilderModel::existsData($this->id)) {
         parent::execute();
         $this->setFilter();
         $this->getData();
         $this->parse();
         $this->display();
     } else {
         // no item found, redirect with an error, because somebody is f*****g with our url
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
     }
 }