code: public function actionPhoto()
      {
          if (empty($_GET['id']) || !($object = $this->params['object'] = Registry::getObject($_GET['id'], false)) || !($typeItem = $this->params['typeItem'] = $object->objectTypeItem)) {
              throw new HttpException(404, "Unknown object.");
          }
          if (!$object->can('read')) {
              throw new HttpException(403, "Unable to access object.");
          }
          Yii::$app->request->object = $object;
  
          if ($object->getBehavior('Photo') === null) {
              throw new HttpException(404, "No profile photo available (A)");
          }
          $options = [];
          if (isset($_GET['size'])) {
              $options['width'] = $_GET['size'];
              $options['height'] = $_GET['size'];
          }
          if (isset($_GET['width'])) {
              $options['width'] = $_GET['width'];
          }
          if (isset($_GET['height'])) {
              $options['height'] = $_GET['height'];
          }
          if (isset($_GET['rotate'])) {
              $options['rotate'] = $_GET['rotate'];
          }
          if (!$object->serve($options)) {
              throw new HttpException(404, "No profile photo available (B)");
          }
      }
docs: [[@doctodo method_description:actionPhoto]].
  
  @throws HttpException [[@doctodo exception_description:HttpException]]