/**
 * Method to add a new record.
 *
 * @return  void
 *
 * @since   4.0.0
 * @throws  NotAllowed
 * @throws  \RuntimeException
 */
public function add()
{
    // Access check.
    if (!$this->allowAdd()) {
        throw new NotAllowed('JLIB_APPLICATION_ERROR_CREATE_RECORD_NOT_PERMITTED', 403);
    }
    $recordId = $this->save();
    $this->displayItem($recordId);
}