Skip to content

Instantly share code, notes, and snippets.

/**
* @param Request $request
* @param AbstractProposal $proposal
* @param string $type
*
* @return Response
*
* @Route("/{id}/import/{type}", requirements={"id" = "\d+"}, name="import_proposal_object", options={"expose":true})
*/
public function importAction(Request $request, AbstractProposal $proposal, $type)
SELECT s.id, s.title, s.number, c.content as main_content, c2.content as exception, c3.content as list_content, c4.content as exception_list, c5.content as list_list_content FROM cdp_section s
INNER JOIN cdp_section_content sc
ON sc.section_id = s.id
INNER JOIN cdp_content c ON c.id = sc.content_id
LEFT JOIN cdp_content c2 ON c2.id = c.exception_id
LEFT JOIN cdp_lists l ON l.id = c.content_list_id
LEFT JOIN cdp_lists_list_items lli on lli.list_id = l.id
LEFT JOIN cdp_list_items li on li.id = lli.list_item_id
LEFT JOIN cdp_list_items_content lic on lic.list_item_id = li.id
LEFT JOIN cdp_content c3 on c3.id = lic.content_id
public function testFindEligiblePartedProposals()
{
$this->logIn();
$user = $this->getMockUser(MockUsers::DEFAULT_USER);
$doctorUser = $this->getMockUser(MockUsers::DOCTOR_USER);
$governmentalUser = $this->getMockUser(MockUsers::GOVERNMENTAL_USER);
$partedProposal = $this->createProposalEntity();
$childProposal = $this->createProposalEntity();
$childProposal2 = $this->createProposalEntity();
if (!$image ||
!(
$objectsManager->isEntityOnProposal($image->getSection(), $proposal) ||
$image instanceof Figure ? $objectsManager->isEntityOnProposal($image, $proposal) : false
)
) {
public function canReattach()
{
$filterFunction = function ($collaborator) {
return in_array($collaborator->getRole()->getName(), array(Role::PROPONENT, coproponent)) && $collaborator->getStatus()->getName() == CollaboratorStatus::ACCEPTED;
});
$parentCollaborators = $this->getParentProposal()->getCollaborators()->filter($filterFunction);
$childCollaborators = $this->getProposal()->getCollaborators()->filter($filterFunction);
if ($parentCollaborators->count() !== $childCollaborators->count()) {
return false;
{% extends ':cdp:base.html.twig' %}
{% block stylesheets %}
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
{% stylesheets
'../app/Resources/public/cdp/css/base.css'
'../vendor/isteven/angular-multi-select/angular-multi-select.css'
filter='cssrewrite'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
if (is_string($proposal)) {
$className = '\Caxy\ProposalBundle\Entity\\' . $proposal;
if (!class_exists($className)) {
return false;
}
$class = new \ReflectionClass($className);
$statuses = $class->getStatusPropertyValue('statuses');
}
$subQuery = $this->getEntityManager()->createQueryBuilder();
$subQuery->select('relatedBallot.id')
->from('ProposalBundle:FloorModifiedProposal', 'floorModifiedProposal')
->join('floorModifiedProposal.ballotsRelatedToMe', 'relatedBallot')
->where($subQuery->expr()->eq('floorModifiedProposal.id', ':floorModifiedProposalId'));
$qb->andWhere($qb->expr()->notIn('fmps.id', $subQuery->getDQL()))
->setParameter('floorModifiedProposalId', $floorModifiedProposalId);
public function preUp(Schema $schema)
{
parent::preUp($schema);
$this->addSql("CREATE TABLE cdp_timeline_link (id INT AUTO_INCREMENT NOT NULL, timeline_id INT DEFAULT NULL, action_button_text VARCHAR(50) NOT NULL, action_button_link VARCHAR(1024) NOT NULL, INDEX IDX_4BF3B3F6EDBEDD37 (timeline_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
$this->addSql("ALTER TABLE cdp_timeline_link ADD CONSTRAINT FK_4BF3B3F6EDBEDD37 FOREIGN KEY (timeline_id) REFERENCES cdp_timeline (id) ON DELETE CASCADE");
}
public function up(Schema $schema)
{
<em>Spiral stairways</em> are permitted to be used as a component in the <em>means of egress</em> only within <em>dwelling units</em> or from a space not more than 250 square feet (23 m<sup>2</sup>) in area and serving not more than five occupants, or from <em>technical production areas</em> in accordance with Section 410.6.
<div class="secondParagraph">A <em>spiral stairway </em>shall have a&nbsp; &nbsp; &nbsp;6 3/4 inch (171 mm) minimum clear tread depth at a point 12 inches (305 mm) from the walkline. The risers shall be sufficient to provide a headroom of 78 inches (1981 mm) minimum, but riser height shall not be more than 91 /2 inches (241 mm). The minimum <em>stairway </em>clear width at and below the <em>handrail </em>shall be 26 inches (660 mm).</div>