|
|
@@ -60,20 +60,20 @@
|
|
|
</para>
|
|
|
|
|
|
<note>
|
|
|
- <title>Setting Conditional Comments</title>
|
|
|
+ <title>Configurando Comentários Condicionais</title>
|
|
|
|
|
|
<para>
|
|
|
- <classname>HeadStyle</classname> allows you to wrap the style tag in conditional
|
|
|
- comments, which allows you to hide it from specific browsers. To add the conditional
|
|
|
- tags, pass the conditional value as part of the <varname>$attributes</varname> parameter
|
|
|
- in the method calls.
|
|
|
+ <classname>HeadStyle</classname> permite que você envolva a tag style em comentários
|
|
|
+ condicionais, que permitem que você as esconda de navegadores específicos. Para
|
|
|
+ adicionar as tags condicionais, passe o valor condicional como parte do parâmetro
|
|
|
+ <varname>$attributes</varname> nas chamadas do método.
|
|
|
</para>
|
|
|
|
|
|
<example id="zend.view.helpers.initial.headstyle.conditional">
|
|
|
- <title>Headstyle With Conditional Comments</title>
|
|
|
+ <title>Headstyle com Comentários Condicionais</title>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
-// adding scripts
|
|
|
+// adicionando scripts
|
|
|
$this->headStyle()->appendStyle($styles, array('conditional' => 'lt IE 7'));
|
|
|
]]></programlisting>
|
|
|
</example>
|
|
|
@@ -108,24 +108,25 @@ $this->headStyle()->appendStyle($styles, array('conditional' => 'lt IE 7'));
|
|
|
</para>
|
|
|
|
|
|
<note>
|
|
|
- <title>UTF-8 encoding used by default</title>
|
|
|
+ <title>Codificação UTF-8 usada por padrão</title>
|
|
|
|
|
|
<para>
|
|
|
- By default, Zend Framework uses <acronym>UTF-8</acronym> as its default encoding, and,
|
|
|
- specific to this case, <classname>Zend_View</classname> does as well. Character encoding
|
|
|
- can be set differently on the view object itself using the
|
|
|
- <methodname>setEncoding()</methodname> method (or the the <varname>encoding</varname>
|
|
|
- instantiation parameter). However, since <classname>Zend_View_Interface</classname> does
|
|
|
- not define accessors for encoding, it's possible that if you are using a custom view
|
|
|
- implementation with this view helper, you will not have a
|
|
|
- <methodname>getEncoding()</methodname> method, which is what the view helper uses
|
|
|
- internally for determining the character set in which to encode.
|
|
|
+ Por padrão, o Zend Framework usa <acronym>UTF-8</acronym> como sua codificação padrão,
|
|
|
+ e, especificamente neste caso, o <classname>Zend_View</classname> faz isto muito bem. A
|
|
|
+ codificação de caracteres pode ser definida de forma diferente no objeto de visualização
|
|
|
+ em si usando o método <methodname>setEncoding()</methodname> (ou a instanciação do
|
|
|
+ parâmetro <varname>encoding</varname>). No entanto, como
|
|
|
+ <classname>Zend_View_Interface</classname> não define acessadores para codificação, é
|
|
|
+ possível que se você estiver usando uma implementação de visualização personalizada com
|
|
|
+ este assistente de visualização, você não terá um método
|
|
|
+ <methodname>getEncoding()</methodname>, que é o que o assistente de visualização usa
|
|
|
+ internamente para determinar o conjunto de caracteres na qual irá codificar.
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
|
- If you do not want to utilize <acronym>UTF-8</acronym> in such a situation, you will
|
|
|
- need to implement a <methodname>getEncoding()</methodname> method in your custom view
|
|
|
- implementation.
|
|
|
+ Se você não quiser utilizar <acronym>UTF-8</acronym> nessa situação, será necessário
|
|
|
+ implementar um método <methodname>getEncoding()</methodname> em sua implementação de
|
|
|
+ visualização personalizada.
|
|
|
</para>
|
|
|
</note>
|
|
|
|
|
|
@@ -161,8 +162,8 @@ $this->headStyle()->prependStyle($firstStyles);
|
|
|
]]></programlisting>
|
|
|
|
|
|
<para>
|
|
|
- When you're finally ready to output all style declarations in your
|
|
|
- layout script, simply echo the helper:
|
|
|
+ Quando você estiver finalmente pronto para liberar todas as declarações de estilo em seu
|
|
|
+ script layout, simplesmente imprima o assistente:
|
|
|
</para>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
@@ -171,14 +172,14 @@ $this->headStyle()->prependStyle($firstStyles);
|
|
|
</example>
|
|
|
|
|
|
<example id="zend.view.helpers.initial.headstyle.capture">
|
|
|
- <title>Capturing Style Declarations Using the HeadStyle Helper</title>
|
|
|
+ <title>Capturando Declarações de Estilo Usando o Assistente HeadStyle</title>
|
|
|
|
|
|
<para>
|
|
|
- Sometimes you need to generate <acronym>CSS</acronym> style declarations
|
|
|
- programmatically. While you could use string concatenation,
|
|
|
- heredocs, and the like, often it's easier just to do so by creating
|
|
|
- the styles and sprinkling in <acronym>PHP</acronym> tags.
|
|
|
- <classname>HeadStyle</classname> lets you do just that, capturing it to the stack:
|
|
|
+ Às vezes você precisa gerar declarações de estilo <acronym>CSS</acronym> de forma
|
|
|
+ programática. Embora você possa usar concatenação de strings, heredocs, e assim por
|
|
|
+ diante, muitas vezes é mais fácil apenas para fazer isso criando estilos e
|
|
|
+ distribuindo-os em tags <acronym>PHP</acronym>. <classname>HeadStyle</classname> permite
|
|
|
+ que você faça exatamente isso, capturando-os para a pilha:
|
|
|
</para>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|
|
|
@@ -190,24 +191,24 @@ body {
|
|
|
]]></programlisting>
|
|
|
|
|
|
<para>
|
|
|
- The following assumptions are made:
|
|
|
+ As seguintes suposições são feitas:
|
|
|
</para>
|
|
|
|
|
|
<itemizedlist>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- The style declarations will be appended to the stack. If you
|
|
|
- wish for them to replace the stack or be added to the top,
|
|
|
- you will need to pass 'SET' or 'PREPEND', respectively, as
|
|
|
- the first argument to <methodname>captureStart()</methodname>.
|
|
|
+ As declarações de estilo serão anexados à pilha. Se você deseja que elas
|
|
|
+ substituam a pilha ou que sejam adicionadas ao topo, você vai precisar passar
|
|
|
+ 'SET' ou 'PREPEND', respectivamente, como o primeiro argumento para
|
|
|
+ <methodname>captureStart()</methodname>.
|
|
|
</para>
|
|
|
</listitem>
|
|
|
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- If you wish to specify any additional attributes for the
|
|
|
- <emphasis><style></emphasis> tag, pass them in an array as
|
|
|
- the second argument to <methodname>captureStart()</methodname>.
|
|
|
+ Se você deseja especificar todos os atributos adicionais para a tag
|
|
|
+ <emphasis><style></emphasis>, passe-os em uma matriz como o segundo
|
|
|
+ argumento para <methodname>captureStart()</methodname>.
|
|
|
</para>
|
|
|
</listitem>
|
|
|
</itemizedlist>
|