Loading photos.info.yml +1 −1 Changes for photos.info.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line name: 'Photos' description: 'Picture management module. Photo albums.' type: module core_version_requirement: ^8.8 || ^9 core_version_requirement: ^8.8 || ^9 || ^10 package: 'photos' configure: photos.admin dependencies: Loading photos.install +3 −3 Changes for photos.install: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ function photos_update_8502(&$sandbox) { $all_created = TRUE; // Only create if the photos view doesn't exist and views is enabled. if (!View::load('photos')) { $config_path = drupal_get_path('module', 'photos') . '/config/optional/views.view.photos.yml'; $config_path = \Drupal::service('extension.list.module')->getPath('photos') . '/config/optional/views.view.photos.yml'; $data = Yaml::parseFile($config_path); \Drupal::configFactory()->getEditable('views.view.photos')->setData($data)->save(TRUE); } Loading @@ -336,7 +336,7 @@ function photos_update_8502(&$sandbox) { } // Album view. if (!View::load('photos_album')) { $config_path = drupal_get_path('module', 'photos') . '/config/optional/views.view.photos_album.yml'; $config_path = \Drupal::service('extension.list.module')->getPath('photos') . '/config/optional/views.view.photos_album.yml'; $data = Yaml::parseFile($config_path); \Drupal::configFactory()->getEditable('views.view.photos_album')->setData($data)->save(TRUE); } Loading @@ -345,7 +345,7 @@ function photos_update_8502(&$sandbox) { } // Album list view. if (!View::load('photos_album_list')) { $config_path = drupal_get_path('module', 'photos') . '/config/optional/views.view.photos_album_list.yml'; $config_path = \Drupal::service('extension.list.module')->getPath('photos') . '/config/optional/views.view.photos_album_list.yml'; $data = Yaml::parseFile($config_path); \Drupal::configFactory()->getEditable('views.view.photos_album_list')->setData($data)->save(TRUE); } Loading photos.module +8 −3 Changes for photos.module: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -514,7 +514,12 @@ function photos_node_view(array &$build, EntityInterface $node, EntityViewDispla $views_display = $view->storage->getDisplay($view_display_id); if (isset($views_display['display_options']['arguments'])) { $arguments = $views_display['display_options']['arguments']; $args = ['view' => $views_view, 'display' => $view_display_id]; // The view. $args = [ 'name' => $views_view, 'display_id' => $view_display_id, ]; // Arguments for contextual filters. foreach ($arguments as $key => $arg) { if ($key == 'uid') { $args['user'] = $node->getOwnerId(); Loading @@ -523,7 +528,7 @@ function photos_node_view(array &$build, EntityInterface $node, EntityViewDispla $args['node'] = $node->id(); } } $photos = call_user_func_array('views_embed_view', $args); $photos = call_user_func_array('views_embed_view', array_values($args)); } else { $photos = views_embed_view($views_view, $view_display_id, $node->id()); Loading Loading @@ -967,7 +972,7 @@ function photos_preprocess_photos_image_html(&$variables, $hook) { if (!file_exists($styleUri)) { $style->createDerivative($uri, $styleUri); } $url = file_create_url($styleUri); $url = \Drupal::service('file_url_generator')->generateAbsoluteString($styleUri); } // Render image view. Loading photos.post_update.php +7 −0 Changes for photos.post_update.php: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -174,3 +174,10 @@ function photos_post_update_migrate_photos_image_entity_2(&$sandbox = NULL) { function photos_post_update_new_photos_upload_container_parameter_token() { // Empty update to cause a cache rebuild so that the container is rebuilt. } /** * Rebuild photos upload container to add new container parameter. */ function photos_post_update_new_photos_upload_container_parameter_file_repositor() { // Empty update to cause a cache rebuild so that the container is rebuilt. } photos.services.yml +1 −1 Changes for photos.services.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,4 +6,4 @@ services: - { name: event_subscriber } photos.upload: class: Drupal\photos\PhotosUpload arguments: ['@config.factory', '@database', '@current_user', '@entity_field.manager', '@entity_type.manager', '@file_system', '@file.usage', '@image.factory', '@messenger', '@module_handler', '@stream_wrapper_manager', '@token', '@transliteration'] arguments: ['@config.factory', '@database', '@current_user', '@entity_field.manager', '@entity_type.manager', '@file.repository', '@file_system', '@file.usage', '@image.factory', '@messenger', '@module_handler', '@stream_wrapper_manager', '@token', '@transliteration'] Loading
photos.info.yml +1 −1 Changes for photos.info.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line name: 'Photos' description: 'Picture management module. Photo albums.' type: module core_version_requirement: ^8.8 || ^9 core_version_requirement: ^8.8 || ^9 || ^10 package: 'photos' configure: photos.admin dependencies: Loading
photos.install +3 −3 Changes for photos.install: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ function photos_update_8502(&$sandbox) { $all_created = TRUE; // Only create if the photos view doesn't exist and views is enabled. if (!View::load('photos')) { $config_path = drupal_get_path('module', 'photos') . '/config/optional/views.view.photos.yml'; $config_path = \Drupal::service('extension.list.module')->getPath('photos') . '/config/optional/views.view.photos.yml'; $data = Yaml::parseFile($config_path); \Drupal::configFactory()->getEditable('views.view.photos')->setData($data)->save(TRUE); } Loading @@ -336,7 +336,7 @@ function photos_update_8502(&$sandbox) { } // Album view. if (!View::load('photos_album')) { $config_path = drupal_get_path('module', 'photos') . '/config/optional/views.view.photos_album.yml'; $config_path = \Drupal::service('extension.list.module')->getPath('photos') . '/config/optional/views.view.photos_album.yml'; $data = Yaml::parseFile($config_path); \Drupal::configFactory()->getEditable('views.view.photos_album')->setData($data)->save(TRUE); } Loading @@ -345,7 +345,7 @@ function photos_update_8502(&$sandbox) { } // Album list view. if (!View::load('photos_album_list')) { $config_path = drupal_get_path('module', 'photos') . '/config/optional/views.view.photos_album_list.yml'; $config_path = \Drupal::service('extension.list.module')->getPath('photos') . '/config/optional/views.view.photos_album_list.yml'; $data = Yaml::parseFile($config_path); \Drupal::configFactory()->getEditable('views.view.photos_album_list')->setData($data)->save(TRUE); } Loading
photos.module +8 −3 Changes for photos.module: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -514,7 +514,12 @@ function photos_node_view(array &$build, EntityInterface $node, EntityViewDispla $views_display = $view->storage->getDisplay($view_display_id); if (isset($views_display['display_options']['arguments'])) { $arguments = $views_display['display_options']['arguments']; $args = ['view' => $views_view, 'display' => $view_display_id]; // The view. $args = [ 'name' => $views_view, 'display_id' => $view_display_id, ]; // Arguments for contextual filters. foreach ($arguments as $key => $arg) { if ($key == 'uid') { $args['user'] = $node->getOwnerId(); Loading @@ -523,7 +528,7 @@ function photos_node_view(array &$build, EntityInterface $node, EntityViewDispla $args['node'] = $node->id(); } } $photos = call_user_func_array('views_embed_view', $args); $photos = call_user_func_array('views_embed_view', array_values($args)); } else { $photos = views_embed_view($views_view, $view_display_id, $node->id()); Loading Loading @@ -967,7 +972,7 @@ function photos_preprocess_photos_image_html(&$variables, $hook) { if (!file_exists($styleUri)) { $style->createDerivative($uri, $styleUri); } $url = file_create_url($styleUri); $url = \Drupal::service('file_url_generator')->generateAbsoluteString($styleUri); } // Render image view. Loading
photos.post_update.php +7 −0 Changes for photos.post_update.php: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -174,3 +174,10 @@ function photos_post_update_migrate_photos_image_entity_2(&$sandbox = NULL) { function photos_post_update_new_photos_upload_container_parameter_token() { // Empty update to cause a cache rebuild so that the container is rebuilt. } /** * Rebuild photos upload container to add new container parameter. */ function photos_post_update_new_photos_upload_container_parameter_file_repositor() { // Empty update to cause a cache rebuild so that the container is rebuilt. }
photos.services.yml +1 −1 Changes for photos.services.yml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,4 +6,4 @@ services: - { name: event_subscriber } photos.upload: class: Drupal\photos\PhotosUpload arguments: ['@config.factory', '@database', '@current_user', '@entity_field.manager', '@entity_type.manager', '@file_system', '@file.usage', '@image.factory', '@messenger', '@module_handler', '@stream_wrapper_manager', '@token', '@transliteration'] arguments: ['@config.factory', '@database', '@current_user', '@entity_field.manager', '@entity_type.manager', '@file.repository', '@file_system', '@file.usage', '@image.factory', '@messenger', '@module_handler', '@stream_wrapper_manager', '@token', '@transliteration']