1 | <?php |
||||
2 | |||||
3 | /* |
||||
4 | * @copyright 2016 Mautic Contributors. All rights reserved |
||||
5 | * @author Mautic |
||||
6 | * |
||||
7 | * @link http://mautic.org |
||||
8 | * |
||||
9 | * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html |
||||
10 | */ |
||||
11 | |||||
12 | namespace MauticPlugin\MauticSocialBundle\Form\Type; |
||||
13 | |||||
14 | use Mautic\CoreBundle\Form\Type\EntityLookupType; |
||||
15 | use Symfony\Component\Form\AbstractType; |
||||
16 | use Symfony\Component\OptionsResolver\Options; |
||||
17 | use Symfony\Component\OptionsResolver\OptionsResolver; |
||||
18 | |||||
19 | /** |
||||
20 | * Class TweetListType. |
||||
21 | */ |
||||
22 | class TweetListType extends AbstractType |
||||
23 | { |
||||
24 | /** |
||||
25 | * {@inheritdoc} |
||||
26 | */ |
||||
27 | public function configureOptions(OptionsResolver $resolver) |
||||
28 | { |
||||
29 | $resolver->setDefaults( |
||||
30 | [ |
||||
31 | 'modal_route' => 'mautic_tweet_action', |
||||
32 | 'modal_header' => 'mautic.integration.Twitter.new.tweet', |
||||
33 | 'model' => 'social.tweet', |
||||
34 | 'model_lookup_method' => 'getLookupResults', |
||||
35 | 'lookup_arguments' => function (Options $options) { |
||||
0 ignored issues
–
show
|
|||||
36 | return [ |
||||
37 | 'type' => 'tweet', |
||||
38 | 'filter' => '$data', |
||||
39 | 'limit' => 0, |
||||
40 | 'start' => 0, |
||||
41 | ]; |
||||
42 | }, |
||||
43 | 'ajax_lookup_action' => function (Options $options) { |
||||
0 ignored issues
–
show
The parameter
$options is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
Loading history...
|
|||||
44 | return 'mauticSocial:getLookupChoiceList'; |
||||
45 | }, |
||||
46 | 'multiple' => true, |
||||
47 | 'required' => false, |
||||
48 | ] |
||||
49 | ); |
||||
50 | } |
||||
51 | |||||
52 | /** |
||||
53 | * @return string |
||||
54 | */ |
||||
55 | public function getBlockPrefix() |
||||
56 | { |
||||
57 | return 'tweet_list'; |
||||
58 | } |
||||
59 | |||||
60 | /** |
||||
61 | * @return string |
||||
62 | */ |
||||
63 | public function getParent() |
||||
64 | { |
||||
65 | return EntityLookupType::class; |
||||
66 | } |
||||
67 | } |
||||
68 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.