###Available Options
<tr>
<td>Options</td>
<td>
<ul>
<li>field (optional) </li>
</ul>
</td>
<td>
<ul>
<li>string|null</li>
</ul>
</td>
<td>
<ul>
<li><code>$field->getName()</code></li>
</ul>
</td>
</tr>
<tr>
<td>Field Extension Options</td>
<td>
<ul>
<li>default_sort</li>
<li>sortable</li>
<li>default_sort_priority (optional)</li>
</ul>
</td>
<td>
<ul>
<li>null|asc|desc</li>
<li>bool</li>
<li>integer</li>
</ul>
</td>
<td>
<ul>
<li><code>null</code></li>
<li><code>true</code></li>
<li><code>empty</code></li>
</ul>
</td>
</tr>
<tr>
<td>Form Extension</td>
<td>
<ul>
<li>form_filter</li>
<li>form_options</li>
<li>form_from_options</li>
<li>form_to_options</li>
<li>form_type (optional) </li>
<li>form_order (optional) </li>
</ul>
</td>
<td>
<ul>
<li>bool</li>
<li>array</li>
<li>array</li>
<li>array</li>
<li>integer</li>
<li>string</li>
</td>
</td>
<td>
<ul>
<li><code>true</code></li>
<li><code>array()</code></li>
<li><code>array()</code></li>
<li><code>array()</code></li>
<li><code>empty</code></li>
<li><code>empty</code></li>
</ul>
</td>
</tr>
</tbody>
Option source | Option name | Value type | Default Value |
####Available Comparison Types:
- eq
- neq
- lt
- lte
- gt
- gte
- in
- notIn,
- between
- isNull
If you don't know how to use datasource-bundle you should look at docs.
$datasource->addField('created','datetime','between',array(
'field' => 'createdAt'
));
Output:
$citeria->where($criteria->expr()->gte('createdAt',$from))
->andWhere($criteria->expr()->lte('createdAt',$to));