[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/include/Webservices/ -> DescribeObject.php (source)

   1  <?php
   2  /*+***********************************************************************************
   3   * The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9   *************************************************************************************/
  10      
  11  	function vtws_describe($elementType,$user){
  12          
  13          global $log,$adb;
  14          $webserviceObject = VtigerWebserviceObject::fromName($adb,$elementType);
  15          $handlerPath = $webserviceObject->getHandlerPath();
  16          $handlerClass = $webserviceObject->getHandlerClass();
  17          
  18          require_once $handlerPath;
  19          
  20          $handler = new $handlerClass($webserviceObject,$user,$adb,$log);
  21          $meta = $handler->getMeta();
  22          
  23          $types = vtws_listtypes(null, $user);
  24          if(!in_array($elementType,$types['types'])){
  25              throw new WebServiceException(WebServiceErrorCode::$ACCESSDENIED,"Permission to perform the operation is denied");
  26          }
  27          
  28          $entity = $handler->describe($elementType);
  29          VTWS_PreserveGlobal::flush();
  30          return $entity;
  31      }
  32      
  33  ?>


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1