This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$dbName = $this->formGetFieldDbName($form_field->dbName, $this->viewData['form_model']); | |
$options = $this->formFieldGetOptions($form_field->dbName, $this->viewData['form_model']); | |
$list_search_prompt = isset($form_field->list_search_prompt) ? $form_field->list_search_prompt : 'Search ' . strtolower($dbName) . '...'; | |
$list_load_indicator = isset($form_field->list_load_indicator) ? $form_field->list_load_indicator : 'phproad/resources/images/form_load_50x50.gif'; | |
$container_id = $dbName.'_cb_container'; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function extend_order_model($order){ | |
if($order->is_new_record()){ | |
$order->shipping_method = Shop_ShippingOption::create()->find_by_ls_api_code('no_shipping_required'); | |
$order->payment_method = Shop_PaymentMethod::create()->find_by_ls_api_code('default'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phpr::$lang->date(Phpr_DateTime $date, '%F %X'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->list_custom_body_cells = PATH_APP . '/modules/hosting/controllers/hosting_domains/_list_body_front_cells.htm'; | |
$this->list_custom_head_cells = PATH_APP . '/modules/hosting/controllers/hosting_domains/_list_head_front_cells.htm'; | |
$this->list_handle_row_click = false; #switches to double click |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function contains($haystack, $needle){ | |
return strpos($haystack, $needle) !== false; | |
} | |
function begins_with($haystack, $needle){ | |
return strpos($haystack, $needle) === 0; | |
} | |
function ends_with($haystack, $needle){ | |
return strlen($haystack) - strlen($needle) === strrpos($haystack,$needle); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backend::$events->addEvent('core:onBeforeListRecordDisplay', $this, 'extend_auto_footprints'); | |
public function extend_auto_footprints($controller, $model_class, $model){ | |
$controller->list_cell_individual_partial['last_interaction'] = 'modules/hosting/controllers/partials/last_interaction.htm'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Extended_ActiveRecord extends Db_ActiveRecord{ | |
public function import_column_definitions(Db_ActiveRecord $model, $context=null){ | |
My_Helper::import_column_definitions($model, $this, $context); | |
} | |
public function import_form_field_definitions(Db_ActiveRecord $model, $context=null, $force_tab=null){ | |
My_Helper::import_form_field_definitions($model, $this, $context, $force_tab); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$curPageIndex = $pagination->getCurrentPageIndex(); | |
$pageNumber = $pagination->getPageCount(); | |
$suffix = isset($suffix) ? $suffix : null; | |
?> | |
<? if($pageNumber != 1) : ?> | |
<div class="text-center"> | |
<ul class="pagination"> | |
<li> | |
<a href="#" class="disabled"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$page_index = $this->request_param(-1, 1) - 1; | |
$records_per_page = 5; | |
$pagination = $posts->paginate($page_index, $records_per_page); | |
$posts = $posts->find_all(); | |
?> | |
<? if($posts->count() != 0) : ?> | |
<div class="post_list"> | |
<? foreach ($posts as $post): ?> | |
<? $this->render_partial('blog:post', array('post' => $post, 'base_url'=>$base_url, 'post_designation' => $post_designation)); ?> |
OlderNewer