Jarves\Propel\WorkspaceManager::getCurrent PHP Метод

getCurrent() публичный статический Метод

public static getCurrent ( )
    public static function getCurrent()
    {
        return static::$current;
    }

Usage Example

Пример #1
0
 /**
  * Since the core provide the pk as array('id' => 123) and not as array(123) we have to convert it for propel orm.
  *
  * @param  array $pk
  * @param  string $objectKey
  *
  * @return mixed Propel PK
  */
 public function getPropelPk($pk, $objectKey = null)
 {
     $definition = $this->getDefinition();
     if ($objectKey) {
         $definition = $this->objects->getDefinition($objectKey);
     }
     $result = [];
     foreach ($definition->getPrimaryKeyNames() as $primaryKey) {
         if (isset($pk[$primaryKey])) {
             $result[] = $pk[$primaryKey];
         }
     }
     if ($definition->getWorkspace()) {
         $result[] = isset($pk['workspaceId']) ? $pk['workspaceId'] : WorkspaceManager::getCurrent();
     }
     return 1 === count($result) ? $result[0] : $result;
 }
All Usage Examples Of Jarves\Propel\WorkspaceManager::getCurrent
WorkspaceManager