/** * @return array */ public function getAction() { $rs = \dcbia::getService("resource"); if (!is_null($this->getPost("resource_type"))) { $rs->setResourceTypeFilter($this->getPost("resource_type")); } elseif (!is_null($this->getPost("subject_of_resource"))) { $rs->setSubjectOfResourceFilter($this->getPost("subject_of_resource")); } elseif (!is_null($this->getPost("key_issue"))) { $rs->setKeyIssueFilter($this->getPost("key_issue")); } if (!is_null($this->getPost("query"))) { $rs->setQuery($this->getPost("query")); } //var_dump($this->getPost("orderby")); die(); if ($this->getPost("orderby") === "date") { $rs->setOrderby("date"); $rs->setOrder($this->getPost("order")); } else { $rs->setOrderby("title"); $rs->setOrder($this->getPost("order")); } $resources = $rs->getPosts(); $rArr = array(); foreach ($resources as $resource) { $rArr[] = $resource->toArray(); } return $rArr; }
<?php use INUtils\Helper\PostHelper; $directorEntity = dcbia::getEntity("director"); ?> <div class="panel-body"> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">PDF</label> <div class="col-lg-10 col-sm-10"> <input type="file" class="form-control" name="file" id="file"/> </div> </div> <?php if ($directorEntity->getFileName() != "") { ?> <a href="<?php echo $directorEntity->getFileUrl(); ?> "><?php echo $directorEntity->getFileName(); ?> </a> <?php } ?> </div> <?php echo PostHelper::addStylesAndScripts();
<?php use INUtils\Helper\PostHelper; $issueEntity = dcbia::getEntity("issue"); ?> <div class="panel-body"> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">Short Description</label> <div class="col-lg-10 col-sm-10"> <textarea type="text" class="form-control" rows="5" name="short_description" id="short_description" required="true"><?php echo $issueEntity->getShortDescription(); ?> </textarea> </div> </div> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">Is Featured?</label> <div class="col-lg-10 col-sm-10"> <input type="checkbox" class="form-control" name="is_featured" id="is_featured" <?php if ($issueEntity->getIsFeatured()) { ?> checked="checked"<?php } ?> /> </div> </div>
<?php use INUtils\Helper\PostHelper; use Resource\Helper\ResourceHelper; $resourceEntity = dcbia::getEntity("resource"); ?> <div class="panel-body"> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">Resource Type</label> <div class="col-lg-10 col-sm-10"> <select class="form-control" name="resource_type" id="resource_type" required="true"> <?php foreach (ResourceHelper::getResourceTypes() as $typeKey => $typeValue) { ?> <option value="<?php echo $typeKey; ?> " <?php if ($typeKey == $resourceEntity->getResourceType()) { echo "selected='selected'"; } ?> > <?php echo $typeValue; ?> </option> <?php
<?php use INUtils\Helper\PostHelper; $home = dcbia::getEntity("home"); ?> <div class="form-group"> <label>Custom Data Label</label> <input type="text" class="form-control" id="customdatalabel" name="customdatalabel" value="<?php echo $home->getCustomdatalabel(); ?> "> </div> <div class="form-group"> <label>Custom Data</label> <input type="number" class="form-control" id="newcustomers" step="any" name="newcustomers" value="<?php echo $home->getNewcustomers(); ?> "> </div> <div class="form-group"> <label>Industry Data Label</label> <input type="text" class="form-control" id="industrydatalabel" name="industrydatalabel" value="<?php echo $home->getIndustrydatalabel(); ?> ">
<?php use INUtils\Helper\PostHelper; $committeeEntity = dcbia::getEntity("committee"); ?> <div class="panel-body"> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">CO - Chairs</label> <div class="col-lg-10 col-sm-10"> <textarea type="text" class="form-control" name="co_chairs" id="co_chairs"><?php echo $committeeEntity->getCoChairs(); ?> </textarea> </div> </div> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">DLD Vice Chair</label> <div class="col-lg-10 col-sm-10"> <textarea type="text" class="form-control" name="vice_chairs" id="vice_chairs"><?php echo $committeeEntity->getViceChairs(); ?> </textarea> </div> </div> </div> <?php echo PostHelper::addStylesAndScripts();
<?php use Staff\Entity\StaffEntity; use INUtils\Helper\PostHelper; $staffEntity = dcbia::getEntity("staff"); ?> <div class="panel-body"> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">Job Title</label> <div class="col-lg-10 col-sm-10"> <input type="text" class="form-control" name="<?php echo StaffEntity::JOB_TITLE; ?> " id="<?php echo StaffEntity::JOB_TITLE; ?> " value="<?php echo $staffEntity->getJobTitle(); ?> " required="true" /> </div> </div> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">Email</label> <div class="col-lg-10 col-sm-10"> <input type="email" class="form-control" name="staff_email" id="staff_email" value="<?php
<?php use INUtils\Helper\PostHelper; $jobEntity = dcbia::getEntity("job"); ?> <div class="panel-body"> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">URL</label> <div class="col-lg-10 col-sm-10"> <input type="url" class="form-control" name="url" id="url" value="<?php echo $jobEntity->getUrl(); ?> "/> </div> </div> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">PDF</label> <div class="col-lg-10 col-sm-10"> <input type="file" class="form-control" name="file" id="file"/> </div> </div> <?php if ($jobEntity->getFileName() != "") { ?> <a href="<?php echo $jobEntity->getFileUrl(); ?> "><?php echo $jobEntity->getFileName(); ?>
<?php use INUtils\Helper\PostHelper; use Board\Entity\BoardEntity; $boardEntity = dcbia::getEntity("board"); ?> <div class="panel-body"> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">Job Title</label> <div class="col-lg-10 col-sm-10"> <input type="text" class="form-control" name="<?php echo BoardEntity::JOB_TITLE; ?> " id="<?php echo BoardEntity::JOB_TITLE; ?> " value="<?php echo $boardEntity->getJobTitle(); ?> " required="true" /> </div> </div> <div class="form-group"> <label class="control-label col-lg-2 col-sm-2">Url</label> <div class="col-lg-10 col-sm-10"> <input type="url" class="form-control" name="url" id="url" value="<?php