Skip to content

Commit

Permalink
Upgrade to braunstetter/helper v0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBrauner committed Jul 29, 2022
1 parent 34a2795 commit cb3be22
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# MediaBundle

This Bundle aims to make working with media entities easy.

It provides a general API for everything related to media objects without restricting your flexibility.

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Braunstetter/media-bundle/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/Braunstetter/media-bundle/?branch=main)
[![Code Coverage](https://scrutinizer-ci.com/g/Braunstetter/media-bundle/badges/coverage.png?b=main)](https://scrutinizer-ci.com/g/Braunstetter/media-bundle/?branch=main)
[![Build Status](https://app.travis-ci.com/Braunstetter/media-bundle.svg?branch=main)](https://app.travis-ci.com/Braunstetter/media-bundle)
[![Total Downloads](http://poser.pugx.org/braunstetter/media-bundle/downloads)](https://packagist.org/packages/braunstetter/media-bundle)
[![License](http://poser.pugx.org/braunstetter/media-bundle/license)](https://packagist.org/packages/braunstetter/media-bundle)

This Bundle aims to make working with media entities easy.

It provides a general API for everything related to media objects without restricting your flexibility.

* [The BaseFile entity](#the-basefile-entity)
* [Important methods](#important-methods)
* [getFullPath](#getfullpath)
Expand Down
6 changes: 3 additions & 3 deletions src/Form/Type/ImageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ public function configureOptions(OptionsResolver $resolver): void

public function finishView(FormView $view, FormInterface $form, array $options)
{
$view->vars = array_replace($view->vars, ['row_attr' => Arr::attachClassToAttr($view->vars['row_attr'], 'cp--form--single_image')]);
$view->vars = array_replace($view->vars, ['row_attr' => Arr::attachClass($view->vars['row_attr'], 'cp--form--single_image')]);

$view->vars = array_replace($view->vars, [
'row_attr' => Arr::attachToAttr($view->vars['row_attr'], ['data-controller' => 'braunstetter--media-bundle--image-upload'])
'row_attr' => Arr::attach($view->vars['row_attr'], ['data-controller' => 'braunstetter--media-bundle--image-upload'])
]);

$view->vars['placeholder_image_path'] = $options['placeholder_image_path'];

$view->vars = array_replace($view->vars, [
'row_attr' => Arr::attachToAttr($view->vars['row_attr'], [
'row_attr' => Arr::attach($view->vars['row_attr'], [
'data-braunstetter--media-bundle--collection-target' => 'field',
]),
]);
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Type/MediaCollectionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
public function finishView(FormView $view, FormInterface $form, array $options)
{
$view->vars = array_replace($view->vars, [
'row_attr' => Arr::attachToAttr($view->vars['row_attr'], [
'row_attr' => Arr::attach($view->vars['row_attr'], [
'data-controller' => 'braunstetter--media-bundle--collection',
'data-braunstetter--media-bundle--collection-max-items-value' => $options['max_items']
]),
'attr' => Arr::attachClassToAttr($view->vars['attr'], 'image-collection'),
'attr' => Arr::attachClass($view->vars['attr'], 'image-collection'),
'max_items' => $options['max_items'],
'include_css' => $options['include_css']
]);
Expand Down
4 changes: 2 additions & 2 deletions tests/coverage.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1658822145">
<project timestamp="1658822145">
<coverage generated="1659116793">
<project timestamp="1659116793">
<file name="/Users/michaelbrauner/Bundles/Symfony/MediaBundle/Bundle/src/Contracts/FileInterface.php">
<metrics loc="24" ncloc="24" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
</file>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb3be22

Please sign in to comment.