concrete/src/Permission/Response/Response.php
public static function getResponse($object)
    {
        $cache = Core::make('cache/request');
        $identifier = sprintf('permission/response/%s/%s', get_class($object), $object->getPermissionObjectIdentifier());
        $item = $cache->getItem($identifier);
        if (!$item->isMiss()) {
            return $item->get();
        }

        $className = $object->getPermissionResponseClassName();
        /** @var \Concrete\Core\Permission\Response\Response $pr */
        $pr = Core::make($className);
        if ($object->getPermissionObjectKeyCategoryHandle()) {
            $category = PermissionKeyCategory::getByHandle($object->getPermissionObjectKeyCategoryHandle());
            $pr->setPermissionCategoryObject($category);
        }
        $pr->setPermissionObject($object);
        $cache->save($item->set($pr));

        return $pr;
    }
public static function getResponse($object)
    {
        $cache = Core::make('cache/request');
        $identifier = sprintf('permission/response/%s/%s', get_class($object), $object->getPermissionObjectIdentifier());
        $item = $cache->getItem($identifier);
        if (!$item->isMiss()) {
            return $item->get();
        }

        $className = $object->getPermissionResponseClassName();
        /** @var \Concrete\Core\Permission\Response\Response $pr */
        $pr = Core::make($className);
        if ($object->getPermissionObjectKeyCategoryHandle()) {
            $category = PermissionKeyCategory::getByHandle($object->getPermissionObjectKeyCategoryHandle());
            $pr->setPermissionCategoryObject($category);
        }
        $pr->setPermissionObject($object);
        $cache->save($item->set($pr));

        return $pr;
    }
public static function getResponse ( $ object ) { $ cache = Core :: make ( 'cache/request' ) ; $ identifier = sprintf ( 'permission/response/%s/%s' , get_class ( $ object ) , $ object -> getPermissionObjectIdentifier ( ) ) ; $ item = $ cache -> getItem ( $ identifier ) ; if ( ! $ item -> isMiss ( ) ) { return $ item -> get ( ) ; } $ className = $ object -> getPermissionResponseClassName ( ) ; /** @var \Concrete\Core\Permission\Response\Response $pr */ $ pr = Core :: make ( $ className ) ; if ( $ object -> getPermissionObjectKeyCategoryHandle ( ) ) { $ category = PermissionKeyCategory :: getByHandle ( $ object -> getPermissionObjectKeyCategoryHandle ( ) ) ; $ pr -> setPermissionCategoryObject ( $ category ) ; } $ pr -> setPermissionObject ( $ object ) ; $ cache -> save ( $ item -> set ( $ pr ) ) ; return $ pr ; }
Passing in any object that implements the ObjectInterface, retrieve the Permission Response object.

@param \Concrete\Core\Permission\ObjectInterface $object

@return \Concrete\Core\Permission\Response\Response
Passing in any object that implements the ObjectInterface retrieve the Permission Response object .