Reputation:
how can i set a default value with different quotes?
/**
* @ORM\Column(type="string", options={"default" = "<link href="https://fonts.googleapis.com/css?family=Nunito+Sans" rel="stylesheet">"})
*/
THX for help
Upvotes: 1
Views: 2058
Reputation: 66
/**
* @ORM\Column(type="string")
*/
protected $field = '<link href="https://fonts.googleapis.com/css?family=Nunito+Sans" rel="stylesheet">';
Upvotes: 0
Reputation: 825
regarding your question, to escape a quotation you need to double it. Here's a working version of your annotation.
@ORM\Column(type="string", options={"default": "<link href=""https://fonts.googleapis.com/css?family=Nunito+Sans"" rel=""stylesheet"">"})
Upvotes: 5